Skip to content

Commit

Permalink
fix bug in compute indicator if no strategy is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBo committed Nov 13, 2019
1 parent 2f8498f commit 2335281
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion repair/apps/statusquo/views/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def get_queryset(self, indicator_flow, geom=None):
hazardous = indicator_flow.hazardous.name
avoidable = indicator_flow.avoidable.name

strategy_id = getattr(self.strategy, 'id', None)

flows = get_annotated_fractionflows(self.keyflow_pk,
strategy_id=self.strategy.id)
strategy_id=strategy_id)

# filter flows by type (waste/product/both)
if flow_type != 'BOTH':
Expand Down

0 comments on commit 2335281

Please sign in to comment.