ldap: Use savepoint=True to avoid breaking ldap sync transaction.

Due to the atomic(savepoint=False) here, an LDAP sync exception while
syncing a single user breaks the whole sync_ldap_user_data transaction,
preventing it from successfully syncing other users.

Fixes a regression introduced in
1eecbad381

Closes #35291.
This commit is contained in:
Mateusz Mandera
2025-07-22 03:29:11 +08:00
committed by Tim Abbott
parent 21558bd784
commit 4bd6fd6307
2 changed files with 14 additions and 1 deletions

View File

@@ -491,6 +491,10 @@ python_rules = RuleList(
"zerver/tests/test_subs.py",
"with transaction.atomic(savepoint=True), self.assertRaises(JsonableError):",
),
(
"zproject/backends.py",
"@transaction.atomic(savepoint=True) # intentional use of savepoint=True",
),
},
},
*whitespace_rules,