Security hardening, multi-site portability, and a documentation and API-surface sweep

This commit is contained in:
2026-08-14 16:28:34 -04:00
parent 72f8da0e58
commit 265ca2eb01
76 changed files with 3684 additions and 811 deletions

View File

@@ -738,6 +738,13 @@ def fix_controls_direction():
relationshiptypeid=controls.relationshiptypeid,
).first()
if duplicate:
# The correctly-directed row exists - but it may itself be soft
# deleted, and deletion here IS soft. Retiring this row without
# looking left the pair with NO live link, while the command
# reported a successful clean-up. Reactivate the one pointing the
# right way before retiring the one pointing the wrong way.
if not duplicate.isactive:
duplicate.isactive = True
row.isactive = False # flipped row already exists, retire this one
deactivated += 1
else: