Saving twice causes model to become non-unique.
JoelAlexander opened this issue · 0 comments
JoelAlexander commented
Given a redisco model:
class User(models.Model):
name = models.Attribute(required=True, unique=True)
password = models.Attribute()
the following sequence fails:
u = User(name='foo')
u.password = 'secret'
u.save()
u.save()
Now, maybe this is reasonable, but the big problem is the return value from the second save call is:
[('name', 'not unique')]
which is extremely misleading.