File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ public function insertOne(TransactionDtoInterface $dto): Transaction
4646 {
4747 $ attributes = $ this ->transformer ->extract ($ dto );
4848 $ instance = $ this ->transaction ->newInstance ($ attributes );
49- assert ($ instance ->save () === true );
49+ $ result = $ instance ::withoutEvents (static fn () => $ instance ->save ());
50+ assert ($ result === true );
51+ assert ($ instance ->getKey () !== null );
5052
5153 return $ instance ;
5254 }
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ public function insertOne(TransferDtoInterface $dto): Transfer
3636 {
3737 $ attributes = $ this ->transformer ->extract ($ dto );
3838 $ instance = $ this ->transfer ->newInstance ($ attributes );
39- assert ($ instance ->save () === true );
39+ $ result = $ instance ::withoutEvents (static fn () => $ instance ->save ());
40+ assert ($ result === true );
41+ assert ($ instance ->getKey () !== null );
4042
4143 return $ instance ;
4244 }
You can’t perform that action at this time.
0 commit comments