diff --git a/src/core/models/schedules.py b/src/core/models/schedules.py index e2b913666ac3e9beceeb56f108c51f2f178f4437..ca3ad8650844051a387f6f3387256866206e0faf 100644 --- a/src/core/models/schedules.py +++ b/src/core/models/schedules.py @@ -849,9 +849,10 @@ class ScheduleSourceImport(models.Model): ) self.summary = f"{data.get('version') or ''}\nDONE: {stats}"[:200] - # disable abort feature, as it hides the actual error messages - # if len(errors) > len(activity) / 2: - # raise Exception('Too many errors, aborting import: ' + stats) + # add debug option to disable abort feature, as it might hide the actual error messages + if len(errors) > len(activity) / 2 and self.import_configuration.get('debug') is not True: + self.save(update_fields=['summary']) + raise Exception('Too many errors, aborting import: ' + stats) self.save(update_fields=['data', 'summary'])