Skip to content

Commit

Permalink
Fixes none value error on calculating base weight
Browse files Browse the repository at this point in the history
  • Loading branch information
bruecksen committed May 30, 2024
1 parent 08aa3f7 commit 48d40fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bakeup/workshop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def unit(self):

@property
def weight_in_base_unit(self):
return self.uom.to_base_unit(self.weight)
return self.uom and self.uom.to_base_unit(self.weight) or self.weight

def convert_weight(self, target_uom):
base_weight = self.weight_in_base_unit
Expand Down

0 comments on commit 48d40fa

Please sign in to comment.