mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Merge branch 'inventree:master' into matmair/issue2385
This commit is contained in:
@ -383,7 +383,7 @@ class PartTestTemplateList(generics.ListCreateAPIView):
|
||||
required = params.get('required', None)
|
||||
|
||||
if required is not None:
|
||||
queryset = queryset.filter(required=required)
|
||||
queryset = queryset.filter(required=str2bool(required))
|
||||
|
||||
return queryset
|
||||
|
||||
|
@ -2740,8 +2740,8 @@ class BomItem(models.Model, DataImportMixin):
|
||||
if not p.active:
|
||||
continue
|
||||
|
||||
# Trackable parts cannot be 'auto allocated'
|
||||
if p.trackable:
|
||||
# Trackable status must be the same as the sub_part
|
||||
if p.trackable != self.sub_part.trackable:
|
||||
continue
|
||||
|
||||
valid_parts.append(p)
|
||||
|
@ -160,13 +160,6 @@ def inventree_in_debug_mode(*args, **kwargs):
|
||||
return djangosettings.DEBUG
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_demo_mode(*args, **kwargs):
|
||||
""" Return True if the server is running in DEMO mode """
|
||||
|
||||
return djangosettings.DEMO_MODE
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_show_about(user, *args, **kwargs):
|
||||
""" Return True if the about modal should be shown """
|
||||
|
Reference in New Issue
Block a user