Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4705 closed (wontfix)

AddManipulator error when using unique_together

Reported by: Filippo Santovito <filippo.santovito@…> Owned by: adrian
Component: Core (Other) Version: 0.96
Severity: Keywords: unique_together AddManipulator
Cc: filippo.santovito@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi all,
I suspect this behaviour is a bug (but it'd be an error related to my code..)
look at this code (I'm using django 0.96):

class MyClass(models.Model):
    class Admin:
        pass
    code = models.CharField(unique=True, maxlength=10)
    description  = models.CharField(maxlength=100)
    what_you_want = models.ForeignKey(AnotherClass)

class MyClassRow(models.Model):
    class Meta:
        unique_together = (("value", "myclass"),)
    value = models.FloatField(core=True, max_digits=10, decimal_places=2)
    myclass = models.ForeignKey(MyClass, edit_inline=models.TABULAR, num_in_admin=10)

when you try to add data to MyClass with Admin you should get the AddManipulator error.

Change History (2)

comment:1 Changed 8 years ago by adrian

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

As Manipulators are going away, I'm marking this as a wontfix.

comment:2 Changed 7 years ago by m.gajda@…

One might use patch from #7353 to fix the issue.

Note: See TracTickets for help on using tickets.
Back to Top