diff options
Diffstat (limited to 'archaeological_warehouse/models.py')
-rw-r--r-- | archaeological_warehouse/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 089a021af..fc0184990 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -962,7 +962,7 @@ class Container(DocumentItem, Merge, LightHistorizedItem, related_name="children", blank=True, null=True) index = models.IntegerField(_("Container ID"), blank=True, null=True, db_index=True) - weight = models.FloatField(_("Weight (g)"), blank=True, null=True) + weight = models.FloatField(_("Measured weight (g)"), blank=True, null=True) calculated_weight = models.FloatField( _("Calculated weight (g)"), blank=True, null=True) cached_weight = models.FloatField( @@ -1102,9 +1102,9 @@ class Container(DocumentItem, Merge, LightHistorizedItem, @property def get_calculated_weight_percent(self): if not self.calculated_weight or not self.weight: - return (self.calculated_weight - - self.weight) / self.calculated_weight * 100 - return 0 + return 0 + return (self.calculated_weight + - self.weight) / self.calculated_weight * 100 @property def get_cached_division(self): |