mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactoring
This commit is contained in:
parent
cd8214ff4a
commit
73892e894e
@ -1080,12 +1080,7 @@ class Part(MPTTModel):
|
||||
|
||||
"""
|
||||
|
||||
n = self.attachments.count()
|
||||
|
||||
if self.variant_of:
|
||||
n += self.variant_of.attachments.count()
|
||||
|
||||
return n
|
||||
return self.part_attachments.count()
|
||||
|
||||
@property
|
||||
def part_attachments(self):
|
||||
|
Loading…
Reference in New Issue
Block a user