Skip to content

Commit

Permalink
Handle a couple of edge cases
Browse files Browse the repository at this point in the history
LBSD-2786
  • Loading branch information
eos87 committed May 3, 2024
1 parent df84153 commit 9d55b69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const LiveblogInstanceSettingsController = (
$scope.settingsLoading = true;

api.instance_settings.query().then((data) => {
$scope.instanceSettings.settings = JSON.stringify(data._items[0].settings);
$scope.instanceSettings.settings = JSON.stringify(data._items[0]?.settings ?? '{}');

$scope.settingsLoading = false;
});
Expand Down
2 changes: 1 addition & 1 deletion server/liveblog/instance_settings/instance_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_existing_config(self):
try:
return self.get(req=None, lookup={})[0]
except IndexError:
return None
return {}


@instance_settings_blueprint.route("/api/instance_settings/current", methods=["GET"])
Expand Down

0 comments on commit 9d55b69

Please sign in to comment.