From fbb9a62eb81d25fb3a0e15da06cc84eebf69a07e Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Tue, 1 Sep 2026 15:29:05 +0530 Subject: [PATCH] Sync system default active state to firm tasks --- app/modules/services/default_task_sync.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/modules/services/default_task_sync.py b/app/modules/services/default_task_sync.py index 2b19d40..967571d 100644 --- a/app/modules/services/default_task_sync.py +++ b/app/modules/services/default_task_sync.py @@ -70,11 +70,16 @@ def _copy_default_columns( setattr(target, name, new_value) changed = True - # System defaults being synced are expected to be usable in the firm. - if hasattr(target, "is_active") and getattr(target, "is_active", None) is not True: - target.is_active = True - changed = True - + # IMPORTANT: + # is_active is copied from ServiceDefaultTaskTemplate above because it is + # a shared mapped column. Do NOT force FirmServiceTaskTemplate back to True. + # + # This makes System Default activation state authoritative during sync: + # System Default disabled -> Firm Task disabled + # System Default enabled -> Firm Task enabled + # + # Firm-only/custom tasks remain untouched because this function is called + # only for tasks matched to current System Defaults. return changed