Skip to content

Commit

Permalink
Make custom partner fees case-insensitive (#511)
Browse files Browse the repository at this point in the history
The implementation of PR #509 made the checks for partner fees
case-sensitive. This PR fixes this.
  • Loading branch information
harisang authored Feb 11, 2025
1 parent 7648df0 commit 1bb7616
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fetch/partner_fees.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ def compute_partner_fees_per_partner(

partner_fees_df["partner_fee_tax"] = (
partner_fees_df["partner"]
.map(config.custom_partner_fee_dict)
.fillna(config.default_partner_fee_cut)
.str.lower() # Convert the partner column to lowercase
.map(
{k.lower(): v for k, v in config.custom_partner_fee_dict.items()}
) # Convert keys to lowercase
.fillna(config.default_partner_fee_cut) # Fill missing values
)

# change all types to object to use native python types
Expand Down

0 comments on commit 1bb7616

Please sign in to comment.