mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP style fixes
This commit is contained in:
parent
6415a20e6e
commit
5cd2c20a11
@ -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 = [
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user