Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pipelines/assets/livelihood_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ def get_instances_from_dataframe(
) or livelihood_activity.get("people_per_household", None)
livelihood_activity["times_per_year"] = (
round(livelihood_activity["kcals_consumed"] / kcals_per_unit / number_of_units)
if number_of_units and kcals_per_unit
if number_of_units
and kcals_per_unit
and livelihood_activity["kcals_consumed"] is not None
else 0
)

Expand Down