Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

Saving twice causes model to become non-unique. #20

Open
JoelAlexander opened this issue Jul 15, 2011 · 0 comments
Open

Saving twice causes model to become non-unique. #20

JoelAlexander opened this issue Jul 15, 2011 · 0 comments

Comments

@JoelAlexander
Copy link

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.

jakepic1 added a commit to jakepic1/redisco that referenced this issue Oct 5, 2011
twidi added a commit to twidi/redisco that referenced this issue Oct 16, 2011
iamteem added a commit that referenced this issue Jul 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant