This commit is contained in:
Dave Dash 2011-03-14 21:19:34 -07:00
Родитель 7f01a6ecab 5102907771
Коммит b667b2ebb7
2 изменённых файлов: 9 добавлений и 3 удалений

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

@ -24,7 +24,7 @@ from reviews.models import Review, ReviewFlag
from users.models import UserProfile
from versions.models import Version, VersionSummary, AppVersion
from files.models import Approval, Platform, File
from zadmin.models import set_config, get_config
from zadmin.models import set_config
from . test_models import create_addon_file
@ -459,6 +459,10 @@ class TestModeratedQueue(QueueTest):
rows = doc('#reviews-flagged .review-flagged:not(.review-saved)')
eq_(len(rows), 0)
r = self.client.get(reverse('editors.eventlog'))
doc = pq(r.content)
assert 'More details' in doc('table a').text()
# Make sure it was actually deleted.
eq_(len(Review.objects.filter(addon=1865)), 1)

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

@ -2,7 +2,7 @@ from django import forms
from django.forms.models import modelformset_factory, BaseModelFormSet
import happyforms
from tower import ugettext as _, ugettext_lazy as _lazy
from tower import ugettext_lazy as _lazy
import amo
import reviews
@ -50,7 +50,9 @@ class BaseReviewFlagFormSet(BaseModelFormSet):
review_addon = review.addon
review_id = review.id
review.delete()
amo.log(amo.LOG.DELETE_REVIEW, review_addon, review_id)
amo.log(amo.LOG.DELETE_REVIEW, review_addon, review_id,
details=dict(title=unicode(review.title),
body=unicode(review.body)))
elif action == reviews.REVIEW_MODERATE_KEEP:
review.editorreview = False
review.save()