Skip to content

Commit f0ec783

Browse files
committed
Rename producer to product in consumers tab
1 parent 2ffbdf3 commit f0ec783

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

activity_browser/layouts/pages/activity_details/consumers_tab.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def build_df(self, exchanges: list[bd.Edge]) -> pd.DataFrame:
7474
output_df = bwutils.AB_metadata.get_metadata(exc_df["output"].unique(), ["name", "type", "key"])
7575

7676
df = exc_df.merge(
77-
input_df.rename({"name": "producer", "type": "_producer_type"}, axis="columns"),
77+
input_df.rename({"name": "product", "type": "_product_type"}, axis="columns"),
7878
left_on="input",
7979
right_on="key",
8080
).drop(columns=["key"])
@@ -85,9 +85,9 @@ def build_df(self, exchanges: list[bd.Edge]) -> pd.DataFrame:
8585
right_on="key",
8686
).drop(columns=["key"])
8787

88-
df = df.rename({"input": "_producer_key", "output": "_consumer_key"}, axis="columns")
88+
df = df.rename({"input": "_product_key", "output": "_consumer_key"}, axis="columns")
8989

90-
cols = ["amount", "unit", "producer", "consumer"]
90+
cols = ["amount", "unit", "product", "consumer"]
9191
cols += [col for col in df.columns if col.startswith("_")]
9292

9393
return df[cols]
@@ -125,11 +125,11 @@ def decorationData(self, col, key):
125125
Returns:
126126
The decoration data for the item.
127127
"""
128-
if key not in ["producer", "consumer"]:
128+
if key not in ["product", "consumer"]:
129129
return
130130

131-
if key == "producer":
132-
activity_type = self["_producer_type"]
131+
if key == "product":
132+
activity_type = self["_product_type"]
133133
else: # key is "consumer"
134134
activity_type = self["_consumer_type"]
135135

0 commit comments

Comments
 (0)