Browse files

Fix copying of plugins for Django 1.5

  • Loading branch information...
1 parent 9adee68 commit 0319f9980c66cde0d43baab64cf497229d2ac377 @bikeshedder bikeshedder committed Mar 26, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 cms/models/pluginmodel.py
View
4 cms/models/pluginmodel.py
@@ -153,9 +153,7 @@ def get_plugin_instance(self, admin=None):
if plugin.model != self.__class__: # and self.__class__ == CMSPlugin:
# (if self is actually a subclass, getattr below would break)
try:
- instance = getattr(self, plugin.model.__name__.lower())
- # could alternatively be achieved with:
- # instance = plugin_class.model.objects.get(cmsplugin_ptr=self)
+ instance = plugin_class.model.objects.get(cmsplugin_ptr=self)
instance._render_meta = self._render_meta
except (AttributeError, ObjectDoesNotExist):
instance = None

0 comments on commit 0319f99

Please sign in to comment.