Sync system default active state to firm tasks

This commit is contained in:
A R R R Associates
2026-09-01 15:29:05 +05:30
parent 204b93d611
commit fbb9a62eb8
+10 -5
View File
@@ -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