mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #25987 -- Made inline formset validation respect unique_together with an unsaved parent object.
Thanks Anton Kuzmichev for the report and Tim for the review.
This commit is contained in:
parent
2c125bded1
commit
1a403aa705
3 changed files with 26 additions and 3 deletions
|
@ -31,5 +31,8 @@ class Poem(models.Model):
|
|||
poet = models.ForeignKey(Poet, models.CASCADE)
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('poet', 'name')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue