Skip to content

Commit

Permalink
server: be more relaxed for db lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
kahkeng committed Sep 18, 2023
1 parent 5181d49 commit 7ee1d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _register_system(system_config_id, system_config_json):
def _get_default_system_config_id():
# we query the db but return the identifier to store, so that we can still
# reference the id even after the session has been closed.
default_system_config = SystemConfig.query.filter_by(json=config.default_config).one_or_none()
default_system_config = SystemConfig.query.filter_by(json=config.default_config).first()
if not default_system_config:
default_system_config = SystemConfig(json=config.default_config)
db_session.add(default_system_config)
Expand Down

0 comments on commit 7ee1d25

Please sign in to comment.