| | 1 | It happens on a second save (when there is already data to be validated) |
| | 2 | |
| | 3 | On 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 | |
| | 5 | Example to reproduce: |
| | 6 | |
| | 7 | models: |
| | 8 | {{{#!python |
| | 9 | class Map(models.Model): |
| | 10 | name = models.CharField(_('name'), max_length=128) |
| | 11 | |
| | 12 | |
| | 13 | class 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 | |
| | 21 | admin: |
| | 22 | {{{#!python |
| | 23 | class MapSpotInline(admin.TabularInline): |
| | 24 | model = MapSpot |
| | 25 | extra = 0 |
| | 26 | |
| | 27 | |
| | 28 | @admin.register(Map) |
| | 29 | class MapAdmin(admin.ModelAdmin): |
| | 30 | inlines = [MapSpotInline] |
| | 31 | }}} |