|
@@ -189,12 +189,14 @@ class EvaluationActivityView(View):
|
|
|
else: # 增加活动
|
|
|
if not all([carousel_image, details_image]):
|
|
|
return response.json(404)
|
|
|
- FreeEvaluationActivity.objects.create(activity_name=activity_name, product_number=product_number,
|
|
|
- carousel_image_url=carousel_image_url, is_show=is_show,
|
|
|
- original_price=original_price,
|
|
|
- details_image_url=details_image_url, issue=issue)
|
|
|
+ activity_qs = FreeEvaluationActivity.objects.create(activity_name=activity_name,
|
|
|
+ product_number=product_number,
|
|
|
+ carousel_image_url=carousel_image_url,
|
|
|
+ is_show=is_show, issue=issue,
|
|
|
+ original_price=original_price,
|
|
|
+ details_image_url=details_image_url)
|
|
|
for index, item in enumerate(activity_process):
|
|
|
- ActivityTime.objects.create(activity_id=activity_id, node_content=item['node_content'],
|
|
|
+ ActivityTime.objects.create(activity_id=activity_qs.id, node_content=item['node_content'],
|
|
|
start_time=item['start_time'], end_time=item['end_time'],
|
|
|
sort=index)
|
|
|
return response.json(0)
|