Skip to content

Commit 80a0a49

Browse files
committed
Node context dialog fixes
1 parent 81529d1 commit 80a0a49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

activity_browser/layouts/panes/database_products.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def build_df(self) -> pd.DataFrame:
154154

155155
# "product_key"
156156
# product of an activity
157-
df["product_key"] = df["key"]
157+
df["product_key"] = df[df["type"] != "nonfunctional"]["key"]
158158

159159
# drop all processes that have products
160160
df = df.drop(df[df.key.isin(df.processor)].index)
@@ -347,7 +347,7 @@ def selected_products(self) -> [tuple]:
347347
list[tuple]: The list of selected products.
348348
"""
349349
items = [i.internalPointer() for i in self.selectedIndexes() if isinstance(i.internalPointer(), ProductItem)]
350-
return list({item["product_key"] for item in items if item["product_key"] is not None})
350+
return list({item["product_key"] for item in items if not pd.isna(item["product_key"])})
351351

352352
@property
353353
def selected_activities(self) -> [tuple]:

0 commit comments

Comments
 (0)