From fb3e6792f3ed6653fb086c99d37ac7614dcd282e Mon Sep 17 00:00:00 2001 From: Andrew Williamson Date: Wed, 22 Jan 2025 09:06:05 +0000 Subject: [PATCH] disable addon reviewer tools action to ContentActionDisableAddon --- src/olympia/reviewers/tests/test_utils.py | 3 +++ src/olympia/reviewers/utils.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/olympia/reviewers/tests/test_utils.py b/src/olympia/reviewers/tests/test_utils.py index 6899714c1398..3feff45ad01c 100644 --- a/src/olympia/reviewers/tests/test_utils.py +++ b/src/olympia/reviewers/tests/test_utils.py @@ -3519,6 +3519,7 @@ def test_record_decision_called_everywhere_checkbox_shown_listed(self): }, 'disable_addon': { 'should_email': True, + 'uses_content_action': True, 'cinder_action': DECISION_ACTIONS.AMO_DISABLE_ADDON, }, 'resolve_reports_job': {'should_email': False, 'cinder_action': None}, @@ -3543,6 +3544,7 @@ def test_record_decision_called_everywhere_checkbox_shown_listed(self): }, 'disable_addon': { 'should_email': True, + 'uses_content_action': True, 'cinder_action': DECISION_ACTIONS.AMO_DISABLE_ADDON, }, 'resolve_reports_job': {'should_email': False, 'cinder_action': None}, @@ -3604,6 +3606,7 @@ def test_record_decision_called_everywhere_checkbox_shown_unlisted(self): }, 'disable_addon': { 'should_email': True, + 'uses_content_action': True, 'cinder_action': DECISION_ACTIONS.AMO_DISABLE_ADDON, }, 'resolve_reports_job': {'should_email': False, 'cinder_action': None}, diff --git a/src/olympia/reviewers/utils.py b/src/olympia/reviewers/utils.py index 7edcef685287..da67fab4ad6c 100644 --- a/src/olympia/reviewers/utils.py +++ b/src/olympia/reviewers/utils.py @@ -1592,9 +1592,8 @@ def enable_addon(self): def disable_addon(self): """Force disable the add-on and all versions.""" - self.addon.force_disable(skip_activity_log=True) log.info('Sending email for %s' % (self.addon)) - self.record_decision(amo.LOG.FORCE_DISABLE) + self.record_decision(amo.LOG.FORCE_DISABLE, action_completed=False) def request_legal_review(self): """Forward add-on and/or job to legal via Cinder."""