File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,15 @@ public function readResolvedReferences(\BO\Zmsentities\Schema\Entity $notificati
5656 new Helper \NoAuth (),
5757 $ resolveReferences - 1
5858 );
59- // only overwrite process with resolved version if not dereferenced
60- if ($ process && $ notification ->getScopeId () == $ process ->getScopeId ()) {
61- $ notification ->process = $ process ;
62- }
63- $ notification ->department = (new \BO \Zmsdb \Department ())
64- ->readEntity ($ notification ->department ['id ' ], $ resolveReferences - 1 );
59+
60+ if ($ process instanceof \BO \Zmsentities \Process && $ process ->hasId ()) {
61+ $ notification ->process = $ process ;
62+ }
63+
64+ if ($ notification ->toProperty ()->department ->id ->isAvailable ()) {
65+ $ notification ->department = (new \BO \Zmsdb \Department ())
66+ ->readEntity ($ notification ->department ['id ' ], $ resolveReferences - 1 );
67+ }
6568 }
6669 return $ notification ;
6770 }
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ public function testBasic()
1111 {
1212 $ now = static ::$ now ;
1313 $ input = $ this ->getTestEntity ();
14- $ input ->process ['status ' ] = 'pickup ' ;
1514
1615 $ this ->assertEquals ('0 ' , $ input ->getFirstClient ()->emailSendCount );
1716
You can’t perform that action at this time.
0 commit comments