1. PyPA
  2. Python Packaging Authority Projects
  3. pypi
  4. Issues

Issues

Issue #169 resolved

exported Foreign-Key fields show an error instead of value

Farzad Abdolhosseini
created an issue

if you have a model with a foreign key to another model, when you export the first model, instead of a value for that foreign key field, you get an error like: Unexpected data type <class 'sth.models.sthElse'> but it would be nice if it showed the unicode function of the model ( which you see in the actual admin page )

theres a quick fix : in line 93 of 'utils.py' you can add these lines if isinstance(value, models.Model) : return value.unicode()

Comments (2)

  1. Log in to comment