Skip to content

Commit

Permalink
fix dict initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
MarJene committed Mar 28, 2022
1 parent 6d543e2 commit b34c0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion som_generationkwh/giscedata_facturacio.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def get_gkwh_shares_dict(self, cursor, uid, ids, context=None):
periods = [(v[0], dict(zip(fields, v[1:]))) for v in vals]

uniq_product_ids = set([p[0] for p in periods])
product_res = {}.fromkeys(uniq_product_ids, [])
product_res = {k: [] for k in uniq_product_ids}

for p in periods:
product_res[p[0]].append(p[1])
Expand Down

0 comments on commit b34c0a7

Please sign in to comment.