don't run signals during fixture setup

This commit is contained in:
Jeff Balogh 2011-07-29 15:58:28 -07:00
Родитель 0e9882d900
Коммит eb5ae54d76
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -78,6 +78,8 @@ class Review(amo.models.ModelBase):
@staticmethod
def post_save(sender, instance, created, **kwargs):
if kwargs.get('raw'):
return
if created:
Review.post_delete(sender, instance)
# Avoid slave lag with the delay.
@ -85,6 +87,8 @@ class Review(amo.models.ModelBase):
@staticmethod
def post_delete(sender, instance, **kwargs):
if kwargs.get('raw'):
return
from . import tasks
pair = instance.addon_id, instance.user_id
# Do this immediately so is_latest is correct. Use default to avoid