Skip to content

Commit

Permalink
Merge PR #234 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by jguenat
  • Loading branch information
sustainabilitybot committed Jan 10, 2025
2 parents bbccf2b + 1275029 commit 29b4506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sustainability_hr_expense_report/models/hr_expense.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def _get_line_amount(self) -> float:

def can_use_account_id_carbon_value(self) -> bool:
self.ensure_one()
return self.account_id.can_compute_carbon_value("in")
return (
self.account_id.can_compute_carbon_value("in") if self.account_id else False
)

def get_account_id_carbon_compute_values(self) -> dict:
self.ensure_one()
Expand Down

0 comments on commit 29b4506

Please sign in to comment.