Skip to content

Commit

Permalink
added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyCherniy committed Jan 25, 2024
1 parent 4f28753 commit 16f8b98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions short_urls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def save(self, *args, **kwargs):

super().save(*args, **kwargs)

# Find already existing links with forbidden domain
# and mark them by ForeignKey
exist = Url.objects.filter(long_url__icontains=self.domain[4:])
exist.update(forbidden_domain=self)

Expand Down

0 comments on commit 16f8b98

Please sign in to comment.