bmihelac/django-shop-discounts — pull request #3 by rockymeza (2012-12-06 19:59:29+00:00)
Title: fixed coupon code filtering

The code for validating a coupon code was creating a SQL query that was something like this:

```sql
SELECT ... AND (`discount_discountbase`.`code` = '' OR `discount_discountbase`.`code` = '' ) AND `discount_discountbase`.`code` = 'codename' )
```

A coupon code can never be both `''` and `'codename'` so the model was never valid.