New issue 113 by trebor74hr: Foreign key to model.proxy not processed well
+ patch
http://code.google.com/p/django-evolution/issues/detail?id=113
If Fk is relating to Proxy model -
http://docs.djangoproject.com/en/dev/topics/db/models/#id8
--hint - reports no issue
but:
--hint -x (execute) - reports this:
File
"R:\env-lib\PYTHON25\lib\site-packages\django_evolution-svn\django_evolution\mutations.py",
l
ine 28, in create_field
field = field_type(to, name=field_name, **field_attrs)
File
"R:\env-lib\PYTHON25\lib\site-packages\django-svn\django\db\models\fields\related.py",
line 6
93, in __init__
to_field = to_field or to._meta.pk.name
File
"R:\env-lib\PYTHON25\lib\site-packages\django_evolution-svn\django_evolution\mutations.py",
l
ine 77, in __getattr__
return self.meta[name]
KeyError: 'pk'
The problem is that related model is proxy and it should be replaced with
proxy_model in creating field for mutations.
The patch attached should make it right.
Attachments:
proxy_patch.diff 663 bytes
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings