Skip to content

Commit

Permalink
Merge pull request mozilla#6400 from akatsoulas/500-error-redirect
Browse files Browse the repository at this point in the history
Remove reference to old FK
  • Loading branch information
akatsoulas authored Dec 9, 2024
2 parents 73bb95f + c5dd660 commit c79210c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kitsune/products/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,10 @@ class Meta(object):

def save(self, *args, **kwargs):
# Mark the old topics as archived
try:
old_topic = Topic.active.get(slug=self.slug, product=self.topic.product)
old_topics = Topic.active.filter(slug=self.slug)
for old_topic in old_topics:
old_topic.is_archived = True
old_topic.save()
except Topic.DoesNotExist:
...
super().save(*args, **kwargs)


Expand Down

0 comments on commit c79210c

Please sign in to comment.