fixed tenant sync failing because row doesnt exist
readded missing transaction.commit_unless_managed() for custom sql