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()
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user