Fixes, cleanups and bugfixes in various systems.

This commit is contained in:
Griatch 2011-06-26 22:03:09 +00:00
parent 1565ac3a72
commit 8770a263ac
7 changed files with 33 additions and 39 deletions

View file

@ -145,7 +145,7 @@ class ObjectManager(TypedObjectManager):
estring = "__iexact"
else:
estring = "__istartswith"
matches = eval("self.filter(db_key%s=ostring%s)" % (estring, lstring_key))
matches = eval("self.filter(db_key%s=ostring%s)" % (estring, lstring_key))
if not matches:
alias_matches = eval("self.model.alias_set.related.model.objects.filter(db_key%s=ostring%s)" % (estring, lstring_alias))
matches = [alias.db_obj for alias in alias_matches]