Skip to content

Commit

Permalink
Fix TypeError in update_lane_size script (#1420)
Browse files Browse the repository at this point in the history
Add default of None to _db arg for the update_lane_size script.

Fixes this traceback:
  File "bin/update_lane_size", line 11, in <module>
    UpdateLaneSizeScript().run()
TypeError: __init__() missing 1 required positional argument: '_db'
  • Loading branch information
jonathangreen authored Oct 2, 2023
1 parent 58b43c4 commit 9017c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2645,7 +2645,7 @@ def add_line(id, name, protocol, metadata_identifier):


class UpdateLaneSizeScript(LaneSweeperScript):
def __init__(self, _db, *args, **kwargs):
def __init__(self, _db=None, *args, **kwargs):
super().__init__(_db, *args, **kwargs)
search = kwargs.get("search_index_client", None)
self._search: ExternalSearchIndex = search or ExternalSearchIndex(self._db)
Expand Down

0 comments on commit 9017c23

Please sign in to comment.