From e2d230f2c66224d4450e98a374a0f7a8a304e211 Mon Sep 17 00:00:00 2001 From: ValueOn AG Date: Mon, 25 May 2026 15:58:42 +0200 Subject: [PATCH] fixed orphan checkker to exclude audit log --- modules/datamodels/datamodelAiAudit.py | 8 ++++---- modules/datamodels/datamodelAudit.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/datamodels/datamodelAiAudit.py b/modules/datamodels/datamodelAiAudit.py index eabe0db6..f78ecd23 100644 --- a/modules/datamodels/datamodelAiAudit.py +++ b/modules/datamodels/datamodelAiAudit.py @@ -35,7 +35,7 @@ class AiAuditLogEntry(PowerOnModel): userId: str = Field( description="ID of the user who triggered the AI call", - json_schema_extra={"label": "Benutzer-ID", "fk_target": {"db": "poweron_app", "table": "UserInDB", "labelField": "username"}}, + json_schema_extra={"label": "Benutzer-ID", "fk_target": {"db": "poweron_app", "table": "UserInDB", "labelField": "username", "softFk": True}}, ) username: Optional[str] = Field( default=None, @@ -44,17 +44,17 @@ class AiAuditLogEntry(PowerOnModel): ) mandateId: str = Field( description="Mandate context of the call", - json_schema_extra={"label": "Mandanten-ID", "fk_target": {"db": "poweron_app", "table": "Mandate", "labelField": "label"}}, + json_schema_extra={"label": "Mandanten-ID", "fk_target": {"db": "poweron_app", "table": "Mandate", "labelField": "label", "softFk": True}}, ) featureInstanceId: Optional[str] = Field( default=None, description="Feature instance context", - json_schema_extra={"label": "Feature-Instanz-ID", "fk_target": {"db": "poweron_app", "table": "FeatureInstance", "labelField": "label"}}, + json_schema_extra={"label": "Feature-Instanz-ID", "fk_target": {"db": "poweron_app", "table": "FeatureInstance", "labelField": "label", "softFk": True}}, ) featureCode: Optional[str] = Field( default=None, description="Feature code (e.g. workspace, trustee)", - json_schema_extra={"label": "Feature", "fk_target": {"db": "poweron_app", "table": "Feature", "column": "code", "labelField": "code"}}, + json_schema_extra={"label": "Feature", "fk_target": {"db": "poweron_app", "table": "Feature", "column": "code", "labelField": "code", "softFk": True}}, ) instanceLabel: Optional[str] = Field( default=None, diff --git a/modules/datamodels/datamodelAudit.py b/modules/datamodels/datamodelAudit.py index 51e97dae..85cdfbf2 100644 --- a/modules/datamodels/datamodelAudit.py +++ b/modules/datamodels/datamodelAudit.py @@ -112,7 +112,7 @@ class AuditLogEntry(PowerOnModel): "frontend_type": "text", "frontend_readonly": True, "frontend_required": True, - "fk_target": {"db": "poweron_app", "table": "UserInDB", "labelField": "username"}, + "fk_target": {"db": "poweron_app", "table": "UserInDB", "labelField": "username", "softFk": True}, }, ) @@ -131,7 +131,7 @@ class AuditLogEntry(PowerOnModel): "frontend_type": "text", "frontend_readonly": True, "frontend_required": False, - "fk_target": {"db": "poweron_app", "table": "Mandate", "labelField": "label"}, + "fk_target": {"db": "poweron_app", "table": "Mandate", "labelField": "label", "softFk": True}, }, ) @@ -143,7 +143,7 @@ class AuditLogEntry(PowerOnModel): "frontend_type": "text", "frontend_readonly": True, "frontend_required": False, - "fk_target": {"db": "poweron_app", "table": "FeatureInstance", "labelField": "label"}, + "fk_target": {"db": "poweron_app", "table": "FeatureInstance", "labelField": "label", "softFk": True}, }, )