Permalink
Browse files

Merge pull request #12 from dhan88/master

DoesNotExist being accessed on string representation of model instead of model object
  • Loading branch information...
2 parents aebe52f + 2282e3f commit f5d59976da71e2e6ad3e1da22057efeb4df8adfd @justquick committed Aug 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 native_tags/contrib/generic_content.py
@@ -107,8 +107,9 @@ def retrieve_object(model, *args, **kwargs):
"""
if len(args) == 1:
kwargs.update({'pk': args[0]})
+ _model = _get_model(model)
try:
- return _get_model(model)._default_manager.get(**kwargs)
- except model.DoesNotExist:
+ return _model._default_manager.get(**kwargs)
+ except _model.DoesNotExist:
return ''
retrieve_object = function(retrieve_object)

0 comments on commit f5d5997

Please sign in to comment.