Skip to content

Commit 0aea2a8

Browse files
committed
#815 Fixed bug causing items to always use divines as qualifier for chaos value, instead of defaulting to chaos
1 parent 4d6061c commit 0aea2a8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/backend_data_retrieval/data_retrieval_app/external_data_retrieval/transforming_data/transform_currency_api_data.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ def _transform_currency_table(
7171
Since a chaos orb is always worth one chaos orb, ninja does not include it in its price api.
7272
"""
7373

74+
missing_chaos_value_mask = (currency_df["chaos.chaosValue"] == 0) | (
75+
currency_df["chaos.chaosValue"].isna()
76+
)
7477
currency_df["chaos.chaosValue"] = currency_df["chaos.chaosValue"].where(
75-
(currency_df["chaos.chaosValue"] == 0)
76-
| (currency_df["chaos.chaosValue"].isna()),
78+
~missing_chaos_value_mask,
7779
currency_df["divine.chaosValue"],
7880
)
7981

0 commit comments

Comments
 (0)