Fix crash when imported CSV has invalid syntax (#5702)

This commit is contained in:
luelista
2025-12-09 08:09:34 +01:00
committed by GitHub
parent 449e8dc905
commit 324eeb8d40

View File

@@ -156,7 +156,7 @@ class BaseProcessView(AsyncAction, FormView):
)
)
reader = parse_csv(self.file.file, 1024 * 1024, "replace", charset=charset)
if reader._had_duplicates:
if reader and reader._had_duplicates:
messages.warning(
self.request,
_(