更新服务器记录时增加更新plan_type字段
This commit is contained in:
parent
5a37d1f036
commit
6a3ead8b46
@ -1557,6 +1557,11 @@ def update_server_record(instance_ids):
|
|||||||
# 更新planid
|
# 更新planid
|
||||||
server.planid = plan_id
|
server.planid = plan_id
|
||||||
|
|
||||||
|
# 直接从实例信息获取plan_type
|
||||||
|
plan_type = instance_info.get('plan_type')
|
||||||
|
if plan_type:
|
||||||
|
server.plan_type = plan_type
|
||||||
|
|
||||||
# 获取套餐信息来计算价格
|
# 获取套餐信息来计算价格
|
||||||
plans_result = get_aliyun_plans(region_id)
|
plans_result = get_aliyun_plans(region_id)
|
||||||
if plans_result and plans_result.get('success') and plans_result.get('data', {}).get('plans'):
|
if plans_result and plans_result.get('success') and plans_result.get('data', {}).get('plans'):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user