fix: lock_and_check_can_update
This commit is contained in:
parent
649022eb57
commit
34ca36aced
|
@ -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("该记录已提交无法更改")
|
||||
|
||||
|
|
Loading…
Reference in New Issue