mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 01:45:28 +00:00
Refactoring
This commit is contained in:
1 parent
cd8214ff4a
commit
73892e894e
1 file changed
+1
-6
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user