#26819: Using a ArrayField on Meta.unique_together throws "unhashable type: 
'list'"
on validate_unique method
----------------------------------+------------------------------------
     Reporter:  gleber-diniz      |                    Owner:  PREM1980
         Type:  Bug               |                   Status:  assigned
    Component:  contrib.postgres  |                  Version:  1.9
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------

Comment (by PREM1980):

 Im trying to recreate this issue but have issues.


 {{{
 class Map(models.Model):


     name = models.CharField(_('name'), max_length=128)


 class MapSpot(models.Model):
     map = models.ForeignKey('body.Map', related_name='spots')
     position = ArrayField(models.IntegerField(), size=2)

     class Meta:
         unique_together = [('map', 'position')]
 }}}


 Error:-

  File "/Users/prem/Documents/django-contribute/mysite/polls/models.py",
 line 13, in Map
     name = models.CharField(_('name'), max_length=128)
 NameError: name '_' is not defined

--
Ticket URL: <https://code.djangoproject.com/ticket/26819#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.09aa9aa4e5fb731b9af1613b51a2b565%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to