File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,9 @@ final public function deactivate(Warning $warning): void
128128 'active ' => false ,
129129 ]);
130130
131- $ this ->user ->notify (new WarningDeactivated ($ staff , $ warning ));
131+ if ($ warning ->torrent ()->exists ()) {
132+ $ this ->user ->notify (new WarningDeactivated ($ staff , $ warning ));
133+ }
132134
133135 $ this ->dispatch ('success ' , type: 'success ' , message: 'Warning was successfully deactivated ' );
134136 }
@@ -187,7 +189,9 @@ final public function destroy(Warning $warning): void
187189
188190 $ warning ->delete ();
189191
190- $ this ->user ->notify (new WarningTorrentDeleted ($ staff , $ warning ));
192+ if ($ warning ->torrent ->exists ()) {
193+ $ this ->user ->notify (new WarningTorrentDeleted ($ staff , $ warning ));
194+ }
191195
192196 $ this ->dispatch ('success ' , type: 'success ' , message: 'Warning was successfully deleted ' );
193197 }
You can’t perform that action at this time.
0 commit comments