chore: consolidate platform split checks
This commit is contained in:
@@ -17,6 +17,7 @@ from govoplan_core.core.campaigns import (
|
||||
CampaignPolicyContextProvider,
|
||||
CampaignRetentionProvider,
|
||||
)
|
||||
from govoplan_core.core.policy import policy_source_step
|
||||
from govoplan_core.core.runtime import get_registry
|
||||
from govoplan_access.backend.db.models import Group, User
|
||||
from govoplan_audit.backend.db.models import AuditLog
|
||||
@@ -339,13 +340,13 @@ def _retention_policy_source_fields(patch: dict[str, Any], *, baseline: bool = F
|
||||
|
||||
def _retention_policy_source_step(scope_type: str, label: str, scope_id: str | None, patch: dict[str, Any], *, baseline: bool = False) -> dict[str, Any]:
|
||||
source_policy = PrivacyRetentionPolicy.model_validate(patch).model_dump(mode="json") if baseline else dict(patch)
|
||||
return {
|
||||
"scope_type": scope_type,
|
||||
"scope_id": scope_id,
|
||||
"label": label,
|
||||
"applied_fields": _retention_policy_source_fields(patch, baseline=baseline),
|
||||
"policy": source_policy,
|
||||
}
|
||||
return policy_source_step(
|
||||
scope_type,
|
||||
label,
|
||||
scope_id,
|
||||
applied_fields=_retention_policy_source_fields(patch, baseline=baseline),
|
||||
policy=source_policy,
|
||||
)
|
||||
|
||||
|
||||
def effective_privacy_policy_sources(
|
||||
|
||||
Reference in New Issue
Block a user