diff --git a/InvenTree/common/api.py b/InvenTree/common/api.py index 9e69d2968d..22dcf4ac14 100644 --- a/InvenTree/common/api.py +++ b/InvenTree/common/api.py @@ -171,7 +171,7 @@ class GlobalSettingsDetail(generics.RetrieveUpdateAPIView): if key not in common.models.InvenTreeSetting.SETTINGS.keys(): raise NotFound() - + return common.models.InvenTreeSetting.get_setting_object(key) permission_classes = [ @@ -239,7 +239,7 @@ class UserSettingsDetail(generics.RetrieveUpdateAPIView): if key not in common.models.InvenTreeUserSetting.SETTINGS.keys(): raise NotFound() - + return common.models.InvenTreeUserSetting.get_setting_object(key, user=self.request.user) permission_classes = [ diff --git a/InvenTree/common/tests.py b/InvenTree/common/tests.py index bdc505b46b..f0b0dbdd05 100644 --- a/InvenTree/common/tests.py +++ b/InvenTree/common/tests.py @@ -276,7 +276,7 @@ class UserSettingsApiTest(InvenTreeAPITestCase): def test_user_setting_init(self): """Test we can retrieve a setting which has not yet been initialized""" - + key = 'HOMEPAGE_PART_LATEST' # Ensure it does not actually exist in the database