I changed my template model to use OneToOneField and remove the Blank=True, but the same error appears...
On 7 nov, 12:30, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 7, 2008 at 9:10 AM, Daniel Roseman < > > > > [EMAIL PROTECTED]> wrote: > > > On Nov 4, 6:02 pm, Petry <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > I'm having a weird problem when using inlineformset_factory, he can > > > only register up to 2 records, after that causes a validation error > > > > "(Hidden field id) User phone with this None already exists." > > > > Here is my forms [1], models [2] and views [3] > > > > [1]http://dpaste.com/88598/ > > > [2]http://dpaste.com/88599/ > > > [3]http://dpaste.com/88600/ > > > > -- > > > > Marcos Daniel Petryhttp://mdpetry.net > > > The problem isn't anything to do with inline forms, it's this in your > > model: > > user = models.ForeignKey(User > > ,blank=True > > ,unique=True) > > What you are saying here is that you can only have each value for user > > once in the whole table - and that includes the value 'None', ie only > > one ShipSalesUser can have an empty user field. > > I have not looked at the original problem in any detail, but the failure to > allow multiple NULL values when unique=True is set for the field was a > Django bug that has been fixed, see: > > http://code.djangoproject.com/ticket/9039 > > So, if this is the cause of the problem, using the 1.0.X branch or current > trunk code instead of 1.0 should fix it. > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---