diff --git a/server/apps/exam/views.py b/server/apps/exam/views.py index 6eb6305..8ccf0a5 100644 --- a/server/apps/exam/views.py +++ b/server/apps/exam/views.py @@ -730,7 +730,7 @@ class ExamRecordViewSet(ListModelMixin, DestroyModelMixin, RetrieveModelMixin, G def acquire_lock(lock_name, timeout=60): identifier = str(uuid.uuid4()) - lock = cache.set(lock_name, identifier, timeout=timeout, nx=True) + lock = cache.set(lock_name, identifier, timeout=timeout) return identifier if lock else None def release_lock(lock_name, identifier):