mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 11:35:41 +00:00
Refactoring
This commit is contained in:
@ -1080,12 +1080,7 @@ class Part(MPTTModel):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
n = self.attachments.count()
|
return self.part_attachments.count()
|
||||||
|
|
||||||
if self.variant_of:
|
|
||||||
n += self.variant_of.attachments.count()
|
|
||||||
|
|
||||||
return n
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def part_attachments(self):
|
def part_attachments(self):
|
||||||
|
Reference in New Issue
Block a user