You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Simplify promo activation logic in PromoActivationService
This commit refactors the `PromoActivationService` to simplify its logic and improve readability.
Key changes include:
- Removed redundant `user_age is None` checks in the age targeting validation, assuming `user_age` is always present.
- Streamlined the promo code acquisition process by removing unnecessary conditional branches and `PromoUnavailableError` exceptions.
- Eliminated an unreachable `PromoActivationError`, making the code path for activating a promotion more direct.
0 commit comments