|
@@ -273,7 +273,7 @@ class UnicomComboView(View):
|
|
'expiration_days': expiration_days,
|
|
'expiration_days': expiration_days,
|
|
'expiration_type': expiration_type,
|
|
'expiration_type': expiration_type,
|
|
'price': price,
|
|
'price': price,
|
|
- 'remark': remark,
|
|
|
|
|
|
+ 'remark': remark if remark else '',
|
|
'is_show': is_show
|
|
'is_show': is_show
|
|
}
|
|
}
|
|
if unicom_combo_qs.filter(id=combo_id).exists():
|
|
if unicom_combo_qs.filter(id=combo_id).exists():
|
|
@@ -282,12 +282,13 @@ class UnicomComboView(View):
|
|
UnicomCombo.objects.get(id=combo_id).pay_type.set(pay_type)
|
|
UnicomCombo.objects.get(id=combo_id).pay_type.set(pay_type)
|
|
else:
|
|
else:
|
|
re_data['updated_time'] = int(time.time())
|
|
re_data['updated_time'] = int(time.time())
|
|
- UnicomCombo.objects.filter(id=combo_id).update(**re_data)
|
|
|
|
|
|
+ re_data['created_time'] = int(time.time())
|
|
UnicomCombo.objects.create(**re_data).pay_type.set(pay_type)
|
|
UnicomCombo.objects.create(**re_data).pay_type.set(pay_type)
|
|
return response.json(0)
|
|
return response.json(0)
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- return response.json(500, repr(e))
|
|
|
|
|
|
+ print(repr(e))
|
|
|
|
+ return response.json(500)
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|
|
def get_unicom_info(request_dict, response):
|
|
def get_unicom_info(request_dict, response):
|