feat: mlogbw支持批量创建
This commit is contained in:
parent
8a83f8b7d8
commit
cd0045c561
|
@ -711,6 +711,11 @@ class MlogbwViewSet(CustomModelViewSet):
|
|||
@transaction.atomic
|
||||
def perform_create(self, serializer):
|
||||
ins:Mlogbw = serializer.save()
|
||||
if isinstance(ins, list):
|
||||
insx = ins
|
||||
else:
|
||||
insx = [ins]
|
||||
for ins in insx:
|
||||
route:Route = ins.mlogb.mlog.route
|
||||
mlogb:Mlogb = ins.mlogb
|
||||
Mlogbw.cal_count_notok(mlogb)
|
||||
|
|
Loading…
Reference in New Issue