|
@@ -178,15 +178,11 @@ class EvaluationActivityView(View):
|
|
product_number=product_number,
|
|
product_number=product_number,
|
|
original_price=original_price,
|
|
original_price=original_price,
|
|
is_show=is_show, update_time=now_time)
|
|
is_show=is_show, update_time=now_time)
|
|
|
|
+ ActivityTime.objects.filter(activity_id=activity_id).delete()
|
|
for index, item in enumerate(activity_process):
|
|
for index, item in enumerate(activity_process):
|
|
- time_qs = ActivityTime.objects.filter(activity_id=activity_id,
|
|
|
|
- node_content=item['node_content'])
|
|
|
|
- if time_qs.exists():
|
|
|
|
- time_qs.update(start_time=item['start_time'], end_time=item['end_time'], sort=index)
|
|
|
|
- else:
|
|
|
|
- ActivityTime.objects.create(activity_id=activity_id, node_content=item['node_content'],
|
|
|
|
- start_time=item['start_time'], end_time=item['end_time'],
|
|
|
|
- sort=index)
|
|
|
|
|
|
+ ActivityTime.objects.create(activity_id=activity_id, node_content=item['node_content'],
|
|
|
|
+ start_time=item['start_time'], end_time=item['end_time'],
|
|
|
|
+ sort=index)
|
|
else: # 增加活动
|
|
else: # 增加活动
|
|
if not all([carousel_image, details_image]):
|
|
if not all([carousel_image, details_image]):
|
|
return response.json(404)
|
|
return response.json(404)
|