Changes between Version 11 and Version 14 of Ticket #26819


Ignore:
Timestamp:
Aug 8, 2016, 2:48:45 AM (8 years ago)
Author:
Claude Paroz
Comment:

Description restored.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26819 – Description

    v11 v14  
     1It happens on a second save (when there is already data to be validated)
     2
     3On this line: "if row_data in seen_data:", because row_data contains a list and seen_data is a set (row_data: (1, [1, 1]) / seen_data: set())
     4
     5Example to reproduce:
     6
     7models:
     8{{{#!python
     9class Map(models.Model):
     10    name = models.CharField(_('name'), max_length=128)
     11
     12
     13class MapSpot(models.Model):
     14    map = models.ForeignKey('body.Map', related_name='spots')
     15    position = ArrayField(models.IntegerField(), size=2)
     16
     17    class Meta:
     18        unique_together = [('map', 'position')]
     19}}}
     20
     21admin:
     22{{{#!python
     23class MapSpotInline(admin.TabularInline):
     24    model = MapSpot
     25    extra = 0
     26
     27
     28@admin.register(Map)
     29class MapAdmin(admin.ModelAdmin):
     30    inlines = [MapSpotInline]
     31}}}
Back to Top