Skip to content

Commit

Permalink
use instance.placeholder_id instead of instance.placeholder.pk. The l…
Browse files Browse the repository at this point in the history
…atter queries the DB if the placeholder isn't already set on the instance
  • Loading branch information
beniwohli committed Jul 25, 2012
1 parent b51bd74 commit ec58439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cms/plugin_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down

0 comments on commit ec58439

Please sign in to comment.