fix: lock_and_check_can_update
This commit is contained in:
parent
34ca36aced
commit
06e86330bd
|
@ -208,8 +208,8 @@ class MlogViewSet(CustomModelViewSet):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def lock_and_check_can_update(cls, mlog:Mlog):
|
def lock_and_check_can_update(cls, mlog:Mlog):
|
||||||
mlog_lock:Mlog = Mlog.objects.select_for_update().get(id=mlog.id)
|
# mlog_lock:Mlog = Mlog.objects.select_for_update().get(id=mlog.id)
|
||||||
if mlog_lock.submit_time is not None:
|
if mlog.submit_time is not None:
|
||||||
raise ParseError("该记录已提交无法更改")
|
raise ParseError("该记录已提交无法更改")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue