2
0
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:
Matthias Mair
2022-04-30 19:53:32 +02:00
committed by GitHub
24 changed files with 762 additions and 492 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 """