|
|
@@ -1364,10 +1364,20 @@ def sync_action_configs(params: SyncLocalConfigs):
|
|
|
result = requests.post(url=sync_url, headers=headers, data=data_json)
|
|
|
tabs = result.json().get("data", {}).get("tabs")
|
|
|
actions = result.json().get("data", {}).get("actions")
|
|
|
+ insert_action_ids = result.json().get("data", {}).get("insert_action_ids")
|
|
|
if tabs:
|
|
|
deviceConfigTabs.deleteConditions(session, {})
|
|
|
deviceConfigs.deleteConditions(session, {})
|
|
|
batch_insert_device_configsNew(session, tabs, actions)
|
|
|
- #因为左右脚线上id可能会发生变化 所以需要重新同步一下本地得配置信息
|
|
|
- syncUserJsonConfigs(hlm_token)
|
|
|
+ if insert_action_ids:
|
|
|
+ for action_item in insert_action_ids:
|
|
|
+ photos = CRUD(PhotoRecord)
|
|
|
+ old_id = action_item.get("old_id")
|
|
|
+ new_id = action_item.get("new_id")
|
|
|
+ kwargs = {"action_id": new_id}
|
|
|
+ photos.updateConditionsAll(
|
|
|
+ session, conditions={"action_id": old_id}, **kwargs
|
|
|
+ )
|
|
|
+ # 因为左右脚线上id可能会发生变化 所以需要重新同步一下本地得配置信息
|
|
|
+ # syncUserJsonConfigs(hlm_token)
|
|
|
return {"code": 0, "msg": "操作成功", "data": None}
|