Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:e2nIEE/pandahub into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
vogt31337 committed Sep 13, 2023
2 parents 3624236 + fa0e5a7 commit f52c875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandahub/lib/PandaHub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ def create_elements_in_db(self, net: Union[int,str], element_type: str, elements
data.append({**elm_data, **var_data, "net_id": net_id})
collection = self._collection_name_of_element(element_type)
insert_result = db[collection].insert_many(data)
return [[z[0].update(_id=z[1]) for z in zip(data, insert_result.inserted_ids)]]
return [z[0] | {"_id": z[1]} for z in zip(data, insert_result.inserted_ids)]

def _add_missing_defaults(self, db, net_id, element_type, element_data):
func_str = f"create_{element_type}"
Expand Down

0 comments on commit f52c875

Please sign in to comment.