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 21, 2025
1 parent 7c4d143 commit f4c8e7e
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()
(self.decision.id and self.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 f4c8e7e

Please sign in to comment.