Skip to content
This repository was archived by the owner on Mar 15, 2018. It is now read-only.

Commit 1b53310

Browse files
author
Rob Hudson
committed
Handle blocklisting on update_status (bug 800086)
1 parent efccaa7 commit 1b53310

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

mkt/webapps/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ def mark_done(self):
373373
self.update(status=amo.WEBAPPS_UNREVIEWED_STATUS)
374374

375375
def update_status(self, using=None):
376-
if self.is_deleted or self.is_disabled:
376+
if (self.is_deleted or self.is_disabled or
377+
self.status == amo.STATUS_BLOCKED):
377378
return
378379

379380
def _log(reason, old=self.status):

mkt/webapps/tests/test_models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,3 +990,9 @@ def test_one_version_public(self):
990990
file_kw=dict(status=amo.STATUS_DISABLED))
991991
app.update_status()
992992
eq_(app.status, amo.STATUS_PUBLIC)
993+
994+
def test_blocklisted(self):
995+
app = amo.tests.app_factory(status=amo.STATUS_BLOCKED)
996+
app.current_version.delete()
997+
app.update_status()
998+
eq_(app.status, amo.STATUS_BLOCKED)

0 commit comments

Comments
 (0)