Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug if use custom generic fields #12

Open
pahaz opened this issue Mar 20, 2013 · 3 comments
Open

Bug if use custom generic fields #12

pahaz opened this issue Mar 20, 2013 · 3 comments
Labels

Comments

@pahaz
Copy link
Contributor

pahaz commented Mar 20, 2013

Traceback:
File " venv\lib\site-packages\django\core\handlers\base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File " venv\lib\site-packages\django\utils\decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File " venv\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File " venv\lib\site-packages\django\contrib\admin\sites.py" in inner
  202.             return view(request, *args, **kwargs)
File " venv\lib\site-packages\reversion_compare\admin.py" in compare_view
  633.         compare_data, has_unfollowed_fields = self.compare(obj, request, version1, version2)
File " venv\lib\site-packages\reversion_compare\admin.py" in compare
  582.             obj_compare = CompareObjects(field, field_name, obj, version1, version2, self.revision_manager)
File " venv\lib\site-packages\reversion_compare\admin.py" in __init__
  223.         self.compare_obj1 = CompareObject(field, field_name, obj, version1, self.has_int_pk, self.adapter)
File " venv\lib\site-packages\reversion_compare\admin.py" in __init__
  48.         self.value = version.field_dict[field_name]

Exception Type: KeyError at /admin/blog/blogpost/2/history/compare/
Exception Value: 'comments'

Bug is i use custom fields:
comments = CommentsField(verbose_name=_("Comments"))

https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/blog/models.py#L21

@jedie
Copy link
Owner

jedie commented Mar 22, 2013

Hm! This related to: #10 isn't it?

Can you try the patch from there?

@pahaz
Copy link
Contributor Author

pahaz commented Mar 22, 2013

likely. Simple solutions I have found. Need for more detailed understanding of the architecture. The matter related objects. Solution can serve as a complete recovery forms. And to get the values ​​of them. The key to solving this problem may be is the code: https://github.com/etianen/django-reversion/blob/master/src/reversion/admin.py#L311-L342

@jedie
Copy link
Owner

jedie commented Jul 22, 2015

Any news on this issues? Did this happen in the current release or can this been closed?!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants