Refactoring

This commit is contained in:
Oliver Walters 2020-08-31 22:30:38 +10:00
parent cd8214ff4a
commit 73892e894e

View File

@ -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):