Merge remote-tracking branch 'inventree/master'

This commit is contained in:
Oliver Walters 2021-02-24 13:08:46 +11:00
commit 98cefc97de
2 changed files with 9 additions and 8 deletions

View File

@ -665,9 +665,10 @@ class PartList(generics.ListCreateAPIView):
ordering = 'name'
search_fields = [
'$name',
'name',
'description',
'$IPN',
'IPN',
'revision',
'keywords',
]

View File

@ -643,12 +643,12 @@ class Part(MPTTModel):
super().clean()
if self.trackable:
for item in self.get_used_in().all():
parent_part = item.part
if not parent_part.trackable:
parent_part.trackable = True
parent_part.clean()
parent_part.save()
for part in self.get_used_in().all():
if not part.trackable:
part.trackable = True
part.clean()
part.save()
name = models.CharField(
max_length=100, blank=False,