update_wproduct_by_test is_midtesting
This commit is contained in:
parent
6eeb6c906b
commit
ea5a7509e7
|
@ -135,8 +135,8 @@ class TestRecordUpdateSerializer(serializers.ModelSerializer):
|
||||||
tri = i['id']
|
tri = i['id']
|
||||||
tri.is_testok = i['is_testok']
|
tri.is_testok = i['is_testok']
|
||||||
tri.is_hidden = i['is_hidden']
|
tri.is_hidden = i['is_hidden']
|
||||||
|
tri.field_value = i['field_value']
|
||||||
if i['field_value'] != tri.field_value:
|
if i['field_value'] != tri.field_value:
|
||||||
tri.field_value = i['field_value']
|
|
||||||
tri.update_by = update_by
|
tri.update_by = update_by
|
||||||
tri.save()
|
tri.save()
|
||||||
return instance
|
return instance
|
||||||
|
|
|
@ -80,7 +80,7 @@ class TestRecordViewSet(ListModelMixin, UpdateModelMixin, RetrieveModelMixin, De
|
||||||
WpmService.add_wproduct_flow_log(obj.wproduct, 'test_delete')
|
WpmService.add_wproduct_flow_log(obj.wproduct, 'test_delete')
|
||||||
return super().destroy(request, *args, **kwargs)
|
return super().destroy(request, *args, **kwargs)
|
||||||
|
|
||||||
@action(methods=['post'], detail=True, perms_map={'post':'testrecord_submit'}, serializer_class=TestRecordUpdateSerializer)
|
@action(methods=['post'], detail=True, perms_map={'post':'testrecord_submit'}, serializer_class=serializers.Serializer)
|
||||||
def submit(self, request, pk=None):
|
def submit(self, request, pk=None):
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
if obj.is_submited and obj.is_midtesting is False:
|
if obj.is_submited and obj.is_midtesting is False:
|
||||||
|
|
|
@ -55,7 +55,7 @@ class WpmService(object):
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
|
|
||||||
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
elif wproduct.act_state == WProduct.WPR_ACT_STATE_TOTEST and \
|
||||||
test.is_midtesing is True:
|
test.is_midtesting is True:
|
||||||
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wproduct.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
test_i = test
|
test_i = test
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue