Click Run demo to scan the diff and post review comments.
3 review comments PR #421
promo.py · line 5bug · medium
Discount can be 0 (not None) for legitimate stacking edge case. Suggest if discount is None or discount.amount == 0: — or pull the early-return into a guard clause.
promo.py · line 7privacy · high
PII in log line. Logging cart.user.email violates the new GDPR retention rule (T-141). Use cart.user.id.
promo.py · filetest · low
No test added for the lower-case promo input case (the upper() call is the change). Suggest a unit test in tests/test_promo.py.
Status: 3 actionable comments · 0 style nits filtered · senior reviewer can focus on architecture.
if discount is None or discount.amount == 0:— or pull the early-return into a guard clause.