Skip to content

Commit e48932d

Browse files
committed
torrent extras createOrUpdate
1 parent 9863398 commit e48932d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/takeedit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function bark($msg) {
242242
do_log("[UPDATE_TORRENT]: $sql");
243243
$affectedRows = sql_query($sql) or sqlerr(__FILE__, __LINE__);
244244
$torrentInfo = \App\Models\Torrent::query()->find($id);
245-
$torrentInfo->extra()->update($extraUpdate);
245+
$torrentInfo->extra()->updateOrCreate(['torrent_id' => $id], $extraUpdate);
246246
fire_event("torrent_updated", $torrentInfo, $torrentOld);
247247
$dateTimeStringNow = date("Y-m-d H:i:s");
248248

0 commit comments

Comments
 (0)