Skip to content
Browse files

use instance.placeholder_id instead of instance.placeholder.pk. The l…

…atter queries the DB if the placeholder isn't already set on the instance
  • Loading branch information...
1 parent b51bd74 commit ec584391d5541290614c788f51218021acbec732 @piquadrat piquadrat committed Jul 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cms/plugin_processors.py
View
2 cms/plugin_processors.py
@@ -12,7 +12,7 @@ def plugin_meta_context_processor(instance, placeholder):
'first': instance._render_meta.index == 0,
'last': instance._render_meta.index == instance._render_meta.total - 1,
'total': instance._render_meta.total,
- 'id_attr': 'plugin_%i_%i' % (instance.placeholder.pk, instance.pk),
+ 'id_attr': 'plugin_%i_%i' % (instance.placeholder_id, instance.pk),
'instance': instance,
}
}

0 comments on commit ec58439

Please sign in to comment.
Something went wrong with that request. Please try again.