Skip to content

Commit 0c4d6eb

Browse files
committed
Fix dropping wastes on the CS
1 parent b9470c9 commit 0c4d6eb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

activity_browser/bwutils/commontasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def is_node_product(node: tuple | int | bd.Node) -> bool:
199199
node = refresh_node(node)
200200
raw_type = node._document.type
201201

202-
if raw_type in ["product", "processwithreferenceproduct"]:
202+
if raw_type in ["product", "waste", "processwithreferenceproduct"]:
203203
return True
204204

205205
if raw_type == "process" and len(node.upstream(kinds=["production"])):

activity_browser/layouts/pages/calculation_setup/functional_unit_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def dropEvent(self, event) -> None:
154154
cs_name = self.parent().calculation_setup_name
155155

156156
keys: list = event.mimeData().retrievePickleData("application/bw-nodekeylist")
157-
for key in keys:
157+
for key in keys.copy():
158158
if not is_node_product(key):
159159
keys.remove(key)
160160

0 commit comments

Comments
 (0)