2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Add some helper magic for setting objects

- If the setting is defined as a "bool" then the returned value is automatically cast to a bool
- Add some more unit testing
This commit is contained in:
Oliver Walters
2020-11-09 23:44:54 +11:00
parent 75ab7b247b
commit c95f124578
5 changed files with 112 additions and 7 deletions

View File

@ -664,7 +664,7 @@ class Part(MPTTModel):
)
component = models.BooleanField(
default=True,
default=part_settings.part_component_default,
verbose_name=_('Component'),
help_text=_('Can this part be used to build other parts?')
)