Skip to content

Commit

Permalink
Fix possible BUG assigning drag period key. See #87
Browse files Browse the repository at this point in the history
Fix #87
  • Loading branch information
XaviTorello committed Jan 31, 2018
1 parent 7fd36dc commit c1b5dfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enerdata/profiles/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ def estimate(self, tariff, balance):
logger.debug('Gap {0}/{1}'.format(
idx + 1, len(self.gaps)
))
drag_key = period.code
period = tariff.get_period_by_date(gap)
drag_key = period.code
gap_cof = cofs.get(gap).cof[tariff.cof]
energy = energy_per_period[period.code]
# If the balance[period] < energy_profile[period] fill with 0
Expand Down

0 comments on commit c1b5dfd

Please sign in to comment.