Skip to content

Commit

Permalink
fix edge case of ContentAction being called with unsaved ContentDecision
Browse files Browse the repository at this point in the history
  • Loading branch information
eviljeff committed Jan 22, 2025
1 parent 7c4d143 commit 789244b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/olympia/abuse/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, decision):

if isinstance(self.target, Addon):
self.addon_version = (
self.decision.target_versions.order_by('-id').first()
(decision.id and decision.target_versions.order_by('-id').first())
or self.target.current_version
or self.target.find_latest_version(channel=None, exclude=())
)
Expand Down

0 comments on commit 789244b

Please sign in to comment.