fix: 用于correct utask错误数据
This commit is contained in:
parent
f456c7cbc8
commit
eaf1a5671f
|
@ -0,0 +1,8 @@
|
||||||
|
from apps.pm.models import Utask, Mtask
|
||||||
|
|
||||||
|
|
||||||
|
def correct_utask_state():
|
||||||
|
utaskIds = Utask.objects.all().values_list('id', flat=True)
|
||||||
|
for utaskId in utaskIds:
|
||||||
|
if Mtask.objects.filter(utask__id=utaskId).exclude(state=Mtask.MTASK_SUBMIT).count() == 0:
|
||||||
|
Utask.objects.filter(id=utaskId).update(state=Utask.UTASK_SUBMIT)
|
Loading…
Reference in New Issue