--
You received this message because you are subscribed to a topic in the Google Groups "Wagtail" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wagtail/Ts_ytEJbQmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wagtail+u...@googlegroups.com.
To post to this group, send email to wag...@googlegroups.com.
Visit this group at http://groups.google.com/group/wagtail.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/1cc7686b-fc79-44ae-a167-09de1cdebad3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I believe the issue is related to the focal_point_key field. The current definition looks like this:
focal_point_key = models.CharField(max_length=255, null=True, editable=False)
I suspect that the unique_together constraint is not working correctly with null=True for this field. Instead, it should be set to blank=True so that the default value will be stored as an empty string rather than null.
focal_point_key = models.CharField(max_length=255, blank=True, editable=False)
In addition, the Django docs suggest that null=True should not be used for CharFields, so this probably needs to be changed either way (https://docs.djangoproject.com/en/1.7/ref/models/fields/#null).
Here is some related reading:
http://stackoverflow.com/a/17510291
http://stackoverflow.com/a/20330228
get() returned more than one Filter -- it returned 3!
Request Method: | GET |
---|---|
Request URL: | http://foxtailprod.southwales.ac.uk/images/bGMgEgXsRDhVT-Xeq1ytEVuQxoI=/974/fill-450x341/ |
Django Version: | 1.6.5 |
Exception Type: | MultipleObjectsReturned |
Exception Value: | get() returned more than one Filter -- it returned 3! |
Exception Location: | /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in get, line 313 |
Python Executable: | /usr/bin/python |
Python Version: | 2.7.6 |
Python Path: | ['/var/www/django/foxtail', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/var/www/django/foxtail/foxtail'] |
Server time: | Wed, 26 Nov 2014 16:22:03 +0000 |