OBS: Run migrate! Made exit's destination into a database field for performance. Fixed a too greedy @reload that caused ContentTypes to loose information. Resolves issue 157.

Migrate with: "python manage.py migrate"
This commit is contained in:
Griatch 2011-04-08 23:10:04 +00:00
parent 0cff54f136
commit 6c53ec2bdb
11 changed files with 227 additions and 84 deletions

View file

@ -143,7 +143,7 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
of database object having that typeclass set on themselves).
"""
dbtotals = {}
typeclass_paths = set(obj.db_typeclass_path for obj in self.all())
typeclass_paths = set(self.values_list('db_typeclass_path', flat=True))
for typeclass_path in typeclass_paths:
dbtotals[typeclass_path] = \
self.filter(db_typeclass_path=typeclass_path).count()