Compare commits
No commits in common. "3ec9fef3cf58d3de50ab3b22bc3819705410bf72" and "cc829c3b54b16a7bfa449f4348e5df2fb7217fdc" have entirely different histories.
3ec9fef3cf
...
cc829c3b54
@ -299,13 +299,8 @@ class PricingService:
|
|||||||
.all()
|
.all()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Map tcgplayer_id to product_id, ensure strings, keep None if not found
|
# Map the ids using the dictionary
|
||||||
df['product_id'] = df['tcgplayer_id'].map(product_id_mapping).apply(lambda x: str(x) if pd.notnull(x) else None)
|
df['product_id'] = df['tcgplayer_id'].map(product_id_mapping)
|
||||||
|
|
||||||
# Log any tcgplayer_ids that didn't map to a product_id
|
|
||||||
null_product_ids = df[df['product_id'].isnull()]['tcgplayer_id'].tolist()
|
|
||||||
if null_product_ids:
|
|
||||||
logger.warning(f"The following tcgplayer_ids could not be mapped to a product_id: {null_product_ids}")
|
|
||||||
|
|
||||||
price_lookup = self.get_all_prices_for_products(df['product_id'].unique())
|
price_lookup = self.get_all_prices_for_products(df['product_id'].unique())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user