Fix missing `alters_data = True` annotations.

This commit is contained in:
Diederik van der Boor
2014-04-03 14:10:53 +02:00
parent b73f22f4e0
commit 157f6b1057
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -81,12 +81,14 @@ class PolymorphicModel(six.with_metaclass(PolymorphicModelBase, models.Model)):
"""
if not self.polymorphic_ctype_id:
self.polymorphic_ctype = ContentType.objects.get_for_model(self, for_concrete_model=False)
pre_save_polymorphic.alters_data = True
def save(self, *args, **kwargs):
"""Overridden model save function which supports the polymorphism
functionality (through pre_save_polymorphic)."""
self.pre_save_polymorphic()
return super(PolymorphicModel, self).save(*args, **kwargs)
save.alters_data = True
def get_real_instance_class(self):
"""