Skip to content

Commit

Permalink
Update 0010_rename_score_definition_framework_scores_definition_and_m…
Browse files Browse the repository at this point in the history
…ore.py

initialize score for all existing compliance assessment, as there is no default value
  • Loading branch information
eric-intuitem committed Apr 28, 2024
1 parent 9bc4cba commit 6de248f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ def fix_well_known_scores(apps, schema_editor):
(assessment.min_score, assessment.max_score) = WELL_KNOWN_SCORES[
assessment.framework.urn
]
assessment.save()
print("custom migration for", assessment.framework.urn)
else:
# no default value, so fix it now
(assessment.min_score, assessment.max_score) = (0, 100)
assessment.save()



class Migration(migrations.Migration):
Expand Down

0 comments on commit 6de248f

Please sign in to comment.