feat: automate patchpanel mappings and cable tenancy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user