mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-04-30 01:24:43 +00:00
Merge pull request #36 from jammons/develop
Changed id to pk in case the primary key isn't called 'id'
This commit is contained in:
commit
00049abc95
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ def flush_cache(apps, options):
|
|||
models = [m for m in cache.get_models(app) if issubclass(m, ImageModel)]
|
||||
for model in models:
|
||||
print 'Flushing cache for "%s.%s"' % (app_label, model.__name__)
|
||||
for obj in model.objects.order_by('-id'):
|
||||
for obj in model.objects.order_by('-pk'):
|
||||
for spec in model._ik.specs:
|
||||
prop = getattr(obj, spec.name(), None)
|
||||
if prop is not None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue