2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-14 00:09:56 +00:00
This commit is contained in:
Oliver Walters
2019-05-20 22:53:01 +10:00
parent 4bde00d925
commit 18ff80312b
3 changed files with 6 additions and 4 deletions

View File

@@ -463,7 +463,7 @@ class Part(models.Model):
@property
def allocated_build_count(self):
""" Return the total number of this that are allocated for builds
""" Return the total number of this part that are allocated for builds
"""
return sum([a['quantity'] for a in self.build_allocation])
@@ -530,7 +530,7 @@ class Part(models.Model):
returns a string representation of a hash object which can be compared with a stored value
"""
hash = hashlib.md5(str(item.part.id).encode())
hash = hashlib.md5(str(self.id).encode())
for item in self.bom_items.all():
hash.update(str(item.sub_part.id).encode())