Skip to content

Commit

Permalink
Merge pull request #2833 from uktrade/fix/dit-dbt-migration-fix
Browse files Browse the repository at this point in the history
fixing eligibility_criteria changes
  • Loading branch information
sekharpanja authored Nov 2, 2023
2 parents b867ab9 + ef32342 commit c1bff03
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@ def search_and_replace_specific_fields(model):
)
for dataset in model.objects.exclude(name__in=skip_items).all():
if dataset.eligibility_criteria:
eligibility_criteria = list(dataset.eligibility_criteria)
eligibility_criteria = [
re.sub(criteria, dit, dbt, flags=re.IGNORECASE)
for criteria in eligibility_criteria
for criteria in list(dataset.eligibility_criteria)
]
dataset.eligibility_criteria = eligibility_criteria
dataset.save()
eligibility_criteria = [
re.sub(
criteria,
dit_full,
dbt_full,
flags=re.IGNORECASE,
)
for criteria in eligibility_criteria
for criteria in list(dataset.eligibility_criteria)
]
dataset.eligibility_criteria = eligibility_criteria
dataset.save()
Expand Down

0 comments on commit c1bff03

Please sign in to comment.