mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
PEP style fixes
This commit is contained in:
parent
fd02f1b761
commit
50a32a13f0
@ -467,8 +467,8 @@ class BaseInvenTreeSetting(models.Model):
|
|||||||
Check if this setting is a "choice" field
|
Check if this setting is a "choice" field
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self.__class__.get_setting_choices(self.key, **kwargs) != None
|
return self.__class__.get_setting_choices(self.key, **kwargs) is not None
|
||||||
|
|
||||||
def as_choice(self, **kwargs):
|
def as_choice(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
Render this setting as the "display" value of a choice field,
|
Render this setting as the "display" value of a choice field,
|
||||||
@ -486,9 +486,8 @@ class BaseInvenTreeSetting(models.Model):
|
|||||||
for value, display in choices:
|
for value, display in choices:
|
||||||
if value == self.value:
|
if value == self.value:
|
||||||
return display
|
return display
|
||||||
|
|
||||||
return self.value
|
return self.value
|
||||||
|
|
||||||
|
|
||||||
def is_bool(self, **kwargs):
|
def is_bool(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user