Skip to content
Snippets Groups Projects
Commit 7e4e3f8a authored by Andreas Hubel's avatar Andreas Hubel
Browse files

fix(scheduleimport): add changes from review

parent e52bc281
No related branches found
No related tags found
No related merge requests found
......@@ -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'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment