mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
98cefc97de
@ -665,9 +665,10 @@ class PartList(generics.ListCreateAPIView):
|
|||||||
ordering = 'name'
|
ordering = 'name'
|
||||||
|
|
||||||
search_fields = [
|
search_fields = [
|
||||||
'$name',
|
'name',
|
||||||
'description',
|
'description',
|
||||||
'$IPN',
|
'IPN',
|
||||||
|
'revision',
|
||||||
'keywords',
|
'keywords',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -643,12 +643,12 @@ class Part(MPTTModel):
|
|||||||
super().clean()
|
super().clean()
|
||||||
|
|
||||||
if self.trackable:
|
if self.trackable:
|
||||||
for item in self.get_used_in().all():
|
for part in self.get_used_in().all():
|
||||||
parent_part = item.part
|
|
||||||
if not parent_part.trackable:
|
if not part.trackable:
|
||||||
parent_part.trackable = True
|
part.trackable = True
|
||||||
parent_part.clean()
|
part.clean()
|
||||||
parent_part.save()
|
part.save()
|
||||||
|
|
||||||
name = models.CharField(
|
name = models.CharField(
|
||||||
max_length=100, blank=False,
|
max_length=100, blank=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user