feat: add force mode to skip failing objects during import

- Force mode rolls back each failing object via a savepoint, skips it
  with a warning and continues instead of aborting the whole import.
  Unresolvable references and deferred phases (relations, custom field
  values, rack placements, many-to-many, cable paths) are guarded too.
- Skip records with dangling generic references instead of writing NULL
  into non-nullable columns (e.g. NetBox Documentation assignments).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-19 13:59:45 +02:00
1 parent b947df022b
commit 5fd246edb8
5 files changed
+226 -14

No files matched your search

+9
View File
@@ -57,6 +57,15 @@ class ImportForm(forms.Form):
initial=True,
help_text="Führt den vollständigen Import aus und setzt die Datenbanktransaktion anschließend zurück.",
)
force = forms.BooleanField(
label="Force-Modus (Fehler überspringen)",
required=False,
initial=False,
help_text=(
"Objekte, deren Import fehlschlägt, werden einzeln übersprungen, statt den gesamten Import "
"zurückzurollen. Übersprungene Objekte werden im Bericht als Warnung aufgeführt."
),
)
confirm_apply = forms.BooleanField(
label="Ich bestätige den schreibenden Import",
required=False,