Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

String to bool logic beucase 'False' is True

Aaron Kimbrelleb1733e652c0
diff --git a/extras/docker/unraid/settings.py b/extras/docker/unraid/settings.py
index 22eecd2bc..1d8952c95 100644
--- a/extras/docker/unraid/settings.py
+++ b/extras/docker/unraid/settings.py
@@ -80,8 +80,15 @@ if os.environ.get("ENABLE_EMAIL"):
WGER_SETTINGS['EMAIL_FROM'] = f'wger Workout Manager <{os.environ.get("FROM_EMAIL")}>'
# Management
-WGER_SETTINGS["ALLOW_REGISTRATION"] = os.environ.get("ALLOW_REGISTRATION")
-WGER_SETTINGS["ALLOW_GUEST_USERS"] = os.environ.get("ALLOW_GUEST_USERS")
+if os.environ.get("ALLOW_REGISTRATION") == 'False'
+ WGER_SETTINGS["ALLOW_REGISTRATION"] = False
+else:
+ WGER_SETTINGS["ALLOW_REGISTRATION"] = True
+
+if os.environ.get("ALLOW_GUEST_USERS") == 'False'
+ WGER_SETTINGS["ALLOW_GUEST_USERS"] = False
+else:
+ WGER_SETTINGS["ALLOW_GUEST_USERS"] = True
# Cache
if os.environ.get("DJANGO_CACHE_BACKEND"):