diff --git a/src/economy/models.py b/src/economy/models.py index 1f94e4a5..7946e241 100644 --- a/src/economy/models.py +++ b/src/economy/models.py @@ -853,9 +853,10 @@ class PosReport(CampRelatedModel, UUIDModel): """Calculate the total HAX sales and number of transactions.""" transactions = 0 total = 0 - for tx in self.pos_json: - transactions += 1 - total += tx["amount"] + if self.pos_json: + for tx in self.pos_json: + transactions += 1 + total += tx["amount"] return transactions, total @property