CustomTextField slug and product to be unique_together

Create issue
Issue #1009 resolved
Andre Miras created an issue

It's a trivial patch for CustomTextField model. It checks if slug and products attribute are unique together. (BTW why is "products" attribute with a "s" ?).

It doesn't make sense to have two same slug for a given product as one couple slug/value will override the other in the POST request when adding the Custom Product to the cart. {{{ quantity=1&productname=SomeProduct&slug=foo&slug=bar }}}

The attached patch is for Satchmo 0.9

Comments (1)

  1. Chris Moffitt repo owner

    Add a unique together constraint on CustomTextField. This is slightly backwards incompatible but the old behavior could be broken for certain scenarios. Closes #1009


  2. Log in to comment