IntegrityError: duplicate key value violates unique constraint "venues_venue_longitude_2d904d039bce1526"

Bug #612997 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LoCo Team Portal
Fix Released
Critical
Michael Hall

Bug Description

[Django] Error (EXTERNAL IP): /venues/add/

Traceback (most recent call last):

  File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/var/lib/python-support/python2.5/django/contrib/auth/decorators.py", line 67, in __call__
    return self.view_func(request, *args, **kwargs)

  File "/srv/loco.ubuntu.com/loco_directory/venues/views.py", line 62, in venue_new
    form.save()

  File "/var/lib/python-support/python2.5/django/forms/models.py", line 319, in save
    return save_instance(self, self.instance, self._meta.fields, fail_message, commit)

  File "/var/lib/python-support/python2.5/django/forms/models.py", line 74, in save_instance
    instance.save()

  File "/var/lib/python-support/python2.5/django/db/models/base.py", line 311, in save
    self.save_base(force_insert=force_insert, force_update=force_update)

  File "/var/lib/python-support/python2.5/django/db/models/base.py", line 383, in save_base
    result = manager._insert(values, return_id=update_pk)

  File "/var/lib/python-support/python2.5/django/db/models/manager.py", line 138, in _insert
    return insert_query(self.model, values, **kwargs)

  File "/var/lib/python-support/python2.5/django/db/models/query.py", line 894, in insert_query
    return query.execute_sql(return_id)

  File "/var/lib/python-support/python2.5/django/db/models/sql/subqueries.py", line 309, in execute_sql
    cursor = super(InsertQuery, self).execute_sql(None)

  File "/var/lib/python-support/python2.5/django/db/models/sql/query.py", line 1734, in execute_sql
    cursor.execute(sql, params)

IntegrityError: duplicate key value violates unique constraint "venues_venue_longitude_2d904d039bce1526"

<ModPythonRequest
path:/venues/add/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'comment': [u'There is a Metra Station right across the street (easily walkable): http://metrarail.com/metra/en/home/maps_schedules/metra_system_map/md-n/station.DEERFIELD.html\r\n\r\nIt is also easily accessible from the highway (and plenty of free parking)'], u'city': [u'Deerfield'], u'name': [u'Barnes & Noble'], u'country': [u'231'], u'longitude': [u'-87.846765518188'], u'_popup': [u'1'], u'venue_url': [u'http://store-locator.barnesandnoble.com/store/2020'], u'address': [u'728 North Waukegan Road'], u'latitude': [u'42.16528020353']}>,

Related branches

Changed in loco-directory:
importance: Undecided → Critical
milestone: none → 0.2.15
status: New → Triaged
Revision history for this message
Daniel Holbach (dholbach) wrote :

Hum, seems like the venue already exists in the LD: http://loco.ubuntu.com/venues/123/detail/

Revision history for this message
Daniel Holbach (dholbach) wrote :

Maybe this happens because we override VenueForm.clean()

Michael Hall (mhall119)
Changed in loco-directory:
status: Triaged → In Progress
assignee: nobody → Michael Hall (mhall119)
Changed in loco-directory:
status: In Progress → Fix Committed
Changed in loco-directory:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.