File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -801,8 +801,13 @@ def process_action(self, release_hold=False):
801801 .order_by ('-pk' )
802802 )
803803 if self .previous_decisions .filter (
804- action = DECISION_ACTIONS .AMO_DISABLE_ADDON
804+ action__in = (
805+ DECISION_ACTIONS .AMO_DISABLE_ADDON ,
806+ DECISION_ACTIONS .AMO_BLOCK_ADDON ,
807+ )
805808 ).exists ():
809+ # FIXME: we should also automatically revert the block if the
810+ # previous decision was AMO_BLOCK_ADDON.
806811 target_versions = list (target_versions )
807812 if target .status == amo .STATUS_DISABLED :
808813 target .force_enable (skip_activity_log = True )
Original file line number Diff line number Diff line change @@ -1783,14 +1783,18 @@ def test_notify_stakeholders_with_policy_texts(self):
17831783
17841784class TestContentActionBlockAddon (TestContentActionDisableAddon ):
17851785 ActionClass = ContentActionBlockAddon
1786- takedown_decision_action = DECISION_ACTIONS .AMO_DISABLE_ADDON
1786+ takedown_decision_action = DECISION_ACTIONS .AMO_BLOCK_ADDON
17871787
17881788 def setUp (self ):
17891789 super ().setUp ()
17901790 self .decision .update (
17911791 reviewer_user = self .task_user ,
17921792 metadata = {ContentDecision .POLICY_DYNAMIC_VALUES : {}},
17931793 )
1794+ self .past_negative_decision .update (
1795+ reviewer_user = self .task_user ,
1796+ metadata = {ContentDecision .POLICY_DYNAMIC_VALUES : {}},
1797+ )
17941798 block = Block .objects .create (addon = self .addon , updated_by = self .task_user )
17951799 BlockVersion .objects .create (block = block , version = self .another_version )
17961800
Original file line number Diff line number Diff line change 3737 'AMO_DELETE_RATING' ,
3838 'AMO_DELETE_COLLECTION' ,
3939 'AMO_REJECT_VERSION_ADDON' ,
40+ # Note: AMO_BLOCK_ADDON is appealable, but at the moment the blocking
41+ # part can't be automatically reverted by a successful appeal and has
42+ # to be done manually.
43+ 'AMO_BLOCK_ADDON' ,
4044 ),
4145)
4246DECISION_ACTIONS .add_subset (
You can’t perform that action at this time.
0 commit comments