Skip to content

Commit

Permalink
Fixes lane saving bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernstein committed Feb 21, 2024
1 parent 1be90db commit d248963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/admin/controller/custom_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _create_or_update_list(

# If this list was used to populate any lanes, those lanes need to have their counts updated.
for lane in Lane.affected_by_customlist(list):
lane.update_size(self._db, self.search_engine)
lane.update_size(self._db, search_engine=self.search_engine)

new_collections = []
for collection_id in collections:
Expand Down Expand Up @@ -399,7 +399,7 @@ def custom_list(self, list_id: int) -> Response | dict | ProblemDetail | None:
# Update the size for any lanes affected by this
# CustomList which _weren't_ deleted.
for lane in surviving_lanes:
lane.update_size(self._db, self.search_engine)
lane.update_size(self._db, search_engine=self.search_engine)
return Response(str(_("Deleted")), 200)

return None
Expand Down
2 changes: 1 addition & 1 deletion api/admin/controller/lanes.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def lanes_for_parent(parent):
for list in lane.customlists:
if list.id not in custom_list_ids:
lane.customlists.remove(list)
lane.update_size(self._db, self.search_engine)
lane.update_size(self._db, search_engine=self.search_engine)

if is_new:
return Response(str(lane.id), 201)
Expand Down

0 comments on commit d248963

Please sign in to comment.