Skip to content

Commit

Permalink
fixed upgrade step
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti committed Nov 6, 2024
1 parent 79fe9a1 commit c829c2a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rer/bandi/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ def migrate_to_3100(context):


def migrate_to_3200(context):
import pdb

pdb.set_trace()
PROFILE_ID = "profile-rer.bandi:migrate_to_3200"
setup_tool = getToolByName(context, "portal_setup")
setup_tool.runAllImportStepsFromProfile(PROFILE_ID)
Expand All @@ -245,12 +242,14 @@ def migrate_to_3200(context):
)
)
bando = brain.getObject()
import pdb

pdb.set_trace()
if getattr(bando, "finanziatori", []):
setattr(bando, "finanziato", True)
keywords = [k for k in getattr(bando, "finanziatori", []) if k]
if bando.Subject():
keywords.extends(getattr(bando, "Subject"))
keywords.extend(bando.Subject())
if keywords:
setattr(bando, "subject", tuple(set(keywords)))
delattr(bando, "finanziatori")
Expand Down

0 comments on commit c829c2a

Please sign in to comment.