diff --git a/isic/core/utils/db.py b/isic/core/utils/db.py index 27ad5a49..74a1d473 100644 --- a/isic/core/utils/db.py +++ b/isic/core/utils/db.py @@ -7,7 +7,7 @@ def lock_table_for_writes(cls: type[models.Model]): with transaction.atomic(): cursor = transaction.get_connection().cursor() - cursor.execute(f"LOCK TABLE {cls._meta.db_table} IN SHARE MODE") + cursor.execute(f"LOCK TABLE {cls._meta.db_table} IN EXCLUSIVE MODE") try: yield finally: