Skip to content

Commit

Permalink
fix(backend): 修复influxdb操作会重复创建op记录 #3537
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Mar 13, 2024
1 parent 4c9519c commit e6e997b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ def _filter_instance_qs(cls, query_filters, query_params):
"cluster__db_module_id",
"cluster__name",
"role",
"machine__ip",
"machine__bk_cloud_id",
"inst_port",
"status",
"create_at",
"machine__bk_host_id",
"machine__spec_config",
"machine__ip",
"machine__bk_cloud_id",
"machine__machine_type",
]

# 获取remote实例的查询集
Expand Down
2 changes: 2 additions & 0 deletions dbm-ui/backend/ticket/flow_manager/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def create_operate_records(self, object_key, record_model, object_ids):

# 创建新加入的record,并批量创建
object_ticket_tuples = list(to_update_records.values_list(object_key, "ticket"))
# 注意都转成int
object_ticket_tuples = list(map(lambda x: (int(x[0]), int(x[1])), object_ticket_tuples))
to_create_records = [
record_model(
**{object_key: obj_id, "flow": self.flow_obj, "ticket": self.ticket, "creator": self.ticket.creator}
Expand Down

0 comments on commit e6e997b

Please sign in to comment.