stephenmcd/cartridge — pull request #80 by AlexHill (2013-01-09 02:16:26+00:00)
Title: Fix AttributeError with empty cart in Django 1.5

With a default Mezzanine/Cartridge installation under Django 1.5 I was getting an AttributeError requesting /shop/cart/ with an empty cart.

Django 1.5's BaseInlineFormSet.__init__ looks for a pk on the form instance, which it couldn't find on EmptyCart.

The one-line fix adds the pk attribute with value None.