fix: lock_and_check_can_update

This commit is contained in:
caoqianming 2025-09-12 17:00:10 +08:00
parent 649022eb57
commit 34ca36aced
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class MlogViewSet(CustomModelViewSet):
@classmethod
def lock_and_check_can_update(cls, mlog:Mlog):
mlog_lock:Mlog = Mlog.objects.select_for_update(id=mlog.id)
mlog_lock:Mlog = Mlog.objects.select_for_update().get(id=mlog.id)
if mlog_lock.submit_time is not None:
raise ParseError("该记录已提交无法更改")