This commit is contained in:
parent
b151ef9920
commit
976f2683a4
@ -342,6 +342,8 @@ class PricingService:
|
|||||||
.filter(CardTCGPlayer.tcgplayer_id.in_(tcgplayer_ids))
|
.filter(CardTCGPlayer.tcgplayer_id.in_(tcgplayer_ids))
|
||||||
.all()
|
.all()
|
||||||
}
|
}
|
||||||
|
# set listed price
|
||||||
|
df['listed_price'] = df['tcg_marketplace_price'].copy()
|
||||||
|
|
||||||
# Map tcgplayer_id to product_id, ensure strings, keep None if not found
|
# Map tcgplayer_id to product_id, ensure strings, keep None if not found
|
||||||
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).apply(lambda x: str(x) if pd.notnull(x) else None)
|
||||||
@ -357,9 +359,6 @@ class PricingService:
|
|||||||
df = df.apply(lambda row: self.apply_price_to_df_columns(row, price_lookup), axis=1)
|
df = df.apply(lambda row: self.apply_price_to_df_columns(row, price_lookup), axis=1)
|
||||||
|
|
||||||
logger.debug(f"Applying pricing algorithm: {ACTIVE_PRICING_ALGORITHIM}")
|
logger.debug(f"Applying pricing algorithm: {ACTIVE_PRICING_ALGORITHIM}")
|
||||||
|
|
||||||
# set listed price
|
|
||||||
df['listed_price'] = df['tcg_marketplace_price'].copy()
|
|
||||||
|
|
||||||
# Apply pricing algorithm
|
# Apply pricing algorithm
|
||||||
df = df.apply(self.apply_pricing_algo, axis=1)
|
df = df.apply(self.apply_pricing_algo, axis=1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user