diff --git a/services/case_service.py b/services/case_service.py index 22eddf36ccb775563c662fd0a20df675c54d48ee..eda635e82d0beedd41ee9ec050b19ce3f2b80e80 100644 --- a/services/case_service.py +++ b/services/case_service.py @@ -54,10 +54,8 @@ async def create_case(data, owner): data.update(dict({'creator': owner, 'parent': parent})) if 'custom_fields' in data: data.update(dict({'custom_fields': data['custom_fields']})) - if 'test_type' in data: - data.update(dict({'type': data['test_type']})) - if data['run_method'] == Case_Run_Method.AUTO.value and 'test_type' in data['custom_fields']: - data.update({'type': data['custom_fields']['test_type']}) + if 'type' in data: + data.update(dict({'type': Case_Type(data['type']).value})) if 'labels' in data: data.update({'labels': data['labels']}) if not await TestSuite.query_obj_one(TestSuite.name == data['suite_name']):