Skip to content

Commit f4d4159

Browse files
committed
Only run update uri query when it has actually changed.
The model's `update()` method is smart about it, but the query builder's `update()` method isn't.
1 parent 6a9d322 commit f4d4159

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Entries/CollectionRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function updateEntryUris($collection, $ids = null)
1515
}
1616

1717
$query->get()->each(function ($entry) {
18-
EntryModel::where('id', $entry->id())->update(['uri' => $entry->uri()]);
18+
EntryModel::find($entry->id())->update(['uri' => $entry->uri()]);
1919
});
2020
}
2121
}

0 commit comments

Comments
 (0)