Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 875677e

Browse files
committed
Fix bug loading settings on first startup
1 parent 4f58a7b commit 875677e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/restapi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,9 @@ def set_settings(self, request):
837837
if resolver != get_value("CONSTANTS", "RESOLVER"):
838838
set_value("CONSTANTS", "RESOLVER", resolver)
839839

840-
if "moderators" in request.args:
841-
mod_json = settings.get()[11]
840+
settings_list = settings.get()
841+
if "moderators" in request.args and settings_list is not None:
842+
mod_json = settings_list[11]
842843
if mod_json != "":
843844
prev_mods = json.loads(mod_json)
844845
current_mods = request.args["moderators"]

0 commit comments

Comments
 (0)