magopian / django-data-exports

Model data exports for Django
http://django-data-exports.rtfd.org
BSD 3-Clause "New" or "Revised" License
39 stars 12 forks source link

Multiple objects returnes #3

Closed rochacbruno closed 11 years ago

rochacbruno commented 11 years ago

I just tested with running django 1.4

I followed all the steps and I got:

AttributeError at /exports/dd/columns
'SingleRelatedObjectDescriptor' object has no attribute 'field'
Request Method: GET
Request URL:    http://192.168.1.107:8000/exports/dd/columns
Django Version: 1.4.3
Exception Type: AttributeError
Exception Value:    
'SingleRelatedObjectDescriptor' object has no attribute 'field'
Exception Location: /usr/local/lib/python2.7/dist-packages/django_data_exports-  0.3-py2.7.egg/data_exports/forms.py in get_choices, line 54
Python Executable:  /usr/bin/python
Python Version: 2.7.3
rochacbruno commented 11 years ago

Also this

MultipleObjectsReturned at /exports/aaaab/columns get() returned more than one Export -- it returned 2! Lookup parameters were {} Request Method: GET Request URL: http://192.168.1.107:8000/exports/aaaab/columns Django Version: 1.4.3 Exception Type: MultipleObjectsReturned Exception Value:
get() returned more than one Export -- it returned 2! Lookup parameters were {} Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in get, line 368 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path:
['/vagrant/spring/src', '/usr/local/lib/python2.7/dist-packages/PyNFe-0.1_custom-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_localflavor_br-1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/braspag-0.3.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_data_exports-0.3-py2.7.egg', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/pymodules/python2.7'] Server time: Seg, 14 Jan 2013 16:47:31 -0200

magopian commented 11 years ago

Hello @rochacbruno, to help me understand and investigate those two issues, could you please tell me exactly how to reproduce it?

Some information that might prove useful:

Regarding the second issue, indeed that's a problem, and I'll fix that straight away in trunk. Thanks for submitting this issue!

magopian commented 11 years ago

Actually I've closed this ticket, as I fixed the issue link to its title.

Please @rochacbruno if you have any more information regarding the very first "no field" error, create a new ticket. Thanks !