feat: automate patchpanel mappings and cable tenancy

This commit is contained in:
2026-08-06 15:09:08 +02:00
parent e1153cfce4
commit 0c4a737d41
9 changed files with 405 additions and 20 deletions
+2 -1
View File
@@ -7,7 +7,7 @@ from django.forms.models import BaseModelForm
from tenancy.models import Tenant
from .runtime import tenant_required
from .tenant_autofill import apply_tenant_autofill
from .tenant_autofill import apply_cable_instance_tenant, apply_tenant_autofill
VALIDATION_MESSAGE = "Für dieses Objekt muss ein Mandant angegeben werden."
@@ -36,6 +36,7 @@ def _install_model_clean_validation(model):
@wraps(original_clean)
def tenant_aware_clean(instance, *args, **kwargs):
apply_cable_instance_tenant(instance)
result = original_clean(instance, *args, **kwargs)
validate_tenant_assignment(instance)
return result