Fixed a typo on the @ic command's search_object call.

This commit is contained in:
Griatch 2013-05-14 21:47:25 +02:00
parent e15d6dfb6e
commit 51cf5461fa
3 changed files with 5 additions and 4 deletions

View file

@ -167,7 +167,8 @@ class ObjectManager(TypedObjectManager):
"""
if isinstance(property_value, basestring):
property_value = to_unicode(property_value)
property_name = "db_%s" % property_name.lstrip('db_')
if isinstance(property_name, basestring):
property_name = "db_%s" % property_name.lstrip('db_')
cand_restriction = candidates and Q(pk__in=[_GA(obj, "id") for obj in make_iter(candidates) if obj]) or Q()
type_restriction = typeclasses and Q(db_typeclass_path__in=make_iter(typeclasses)) or Q()
try: