Skip to content

Commit

Permalink
the old contracts were not migrated
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoCubero committed Jul 26, 2024
1 parent da37885 commit 21bb888
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions giscedata_facturacio_comer_som/giscedata_facturacio_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def te_autoconsum_collectiu(fact, pol):

def te_autoconsum_no_collectiu(fact, pol):
if te_autoconsum(fact, pol):
if len(pol.autoconsum_cups_ids) == 0: # old cases not migrated
return True

for cups_autoconsum in pol.autoconsum_cups_ids:
if cups_autoconsum.autoconsum_id:
if cups_autoconsum.autoconsum_id.collectiu is False:
Expand Down

0 comments on commit 21bb888

Please sign in to comment.