Merge branch 'new-stuff'
All checks were successful
Deploy App to Docker / deploy (push) Successful in 1m10s
All checks were successful
Deploy App to Docker / deploy (push) Successful in 1m10s
This commit is contained in:
commit
3ec9fef3cf
@ -299,8 +299,13 @@ class PricingService:
|
|||||||
.all()
|
.all()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Map the ids using the dictionary
|
# Map tcgplayer_id to product_id, ensure strings, keep None if not found
|
||||||
df['product_id'] = df['tcgplayer_id'].map(product_id_mapping)
|
df['product_id'] = df['tcgplayer_id'].map(product_id_mapping).apply(lambda x: str(x) if pd.notnull(x) else None)
|
||||||
|
|
||||||
|
# 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