Skip to content

Commit

Permalink
migration system settings fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeaowens committed Jan 10, 2024
1 parent 7d41feb commit 5f1b6b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dojo/db_migrations/0197_finding_sla_expiration_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def calculate_sla_expiration_dates(apps, schema_editor):
Product = apps.get_model('dojo', 'Product')
Finding = apps.get_model('dojo', 'Finding')

if System_Settings.objects.get().enable_finding_sla:
ss, _ = System_Settings.objects.get_or_create()
if ss.enable_finding_sla:
for p in Product.objects.all():
sla_config = SLA_Configuration.objects.filter(id=p.sla_configuration_id).first()
for f in Finding.objects.filter(test__engagement__product__id=p.id):
Expand Down

0 comments on commit 5f1b6b0

Please sign in to comment.