|
67 | 67 | (IMPORT_CREATED_FINDING, "created"), |
68 | 68 | (IMPORT_CLOSED_FINDING, "closed"), |
69 | 69 | (IMPORT_REACTIVATED_FINDING, "reactivated"), |
70 | | - (IMPORT_UNTOUCHED_FINDING, "left untouched"), |
| 70 | + (IMPORT_UNTOUCHED_FINDING, "untouched"), |
71 | 71 | ] |
72 | 72 |
|
73 | 73 |
|
@@ -1053,7 +1053,7 @@ def save(self, *args, **kwargs): |
1053 | 1053 | super(Product, product).save() |
1054 | 1054 | # launch the async task to update all finding sla expiration dates |
1055 | 1055 | from dojo.sla_config.helpers import update_sla_expiration_dates_sla_config_async |
1056 | | - update_sla_expiration_dates_sla_config_async(self, tuple(severities), products) |
| 1056 | + update_sla_expiration_dates_sla_config_async(self, products, tuple(severities)) |
1057 | 1057 |
|
1058 | 1058 | def clean(self): |
1059 | 1059 | sla_days = [self.critical, self.high, self.medium, self.low] |
@@ -1214,7 +1214,7 @@ def save(self, *args, **kwargs): |
1214 | 1214 | sla_config.async_updating = True |
1215 | 1215 | super(SLA_Configuration, sla_config).save() |
1216 | 1216 | # launch the async task to update all finding sla expiration dates |
1217 | | - from dojo.product.helpers import update_sla_expiration_dates_product_async |
| 1217 | + from dojo.sla_config.helpers import update_sla_expiration_dates_product_async |
1218 | 1218 | update_sla_expiration_dates_product_async(self, sla_config) |
1219 | 1219 |
|
1220 | 1220 | def get_absolute_url(self): |
@@ -2679,6 +2679,7 @@ def __str__(self): |
2679 | 2679 |
|
2680 | 2680 | def save(self, dedupe_option=True, rules_option=True, product_grading_option=True, # noqa: FBT002 |
2681 | 2681 | issue_updater_option=True, push_to_jira=False, user=None, *args, **kwargs): # noqa: FBT002 - this is bit hard to fix nice have this universally fixed |
| 2682 | + logger.debug("Start saving finding of id " + str(self.id) + " dedupe_option:" + str(dedupe_option) + " (self.pk is %s)", "None" if self.pk is None else "not None") |
2682 | 2683 |
|
2683 | 2684 | from dojo.finding import helper as finding_helper |
2684 | 2685 |
|
@@ -3043,7 +3044,7 @@ def get_sla_start_date(self): |
3043 | 3044 | return self.date |
3044 | 3045 |
|
3045 | 3046 | def get_sla_period(self): |
3046 | | - sla_configuration = SLA_Configuration.objects.filter(id=self.test.engagement.product.sla_configuration_id).first() |
| 3047 | + sla_configuration = self.test.engagement.product.sla_configuration |
3047 | 3048 | sla_period = getattr(sla_configuration, self.severity.lower(), None) |
3048 | 3049 | enforce_period = getattr(sla_configuration, str("enforce_" + self.severity.lower()), None) |
3049 | 3050 | return sla_period, enforce_period |
@@ -3140,6 +3141,7 @@ def has_finding_group(self): |
3140 | 3141 | return self.finding_group is not None |
3141 | 3142 |
|
3142 | 3143 | def save_no_options(self, *args, **kwargs): |
| 3144 | + logger.debug("save_no_options") |
3143 | 3145 | return self.save(dedupe_option=False, rules_option=False, product_grading_option=False, |
3144 | 3146 | issue_updater_option=False, push_to_jira=False, user=None, *args, **kwargs) |
3145 | 3147 |
|
|
0 commit comments