Skip to content

Commit

Permalink
fix: missing indexes code in models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ecugol committed Oct 24, 2023
1 parent cdeafc4 commit a918f43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tinylinks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def __unicode__(self):

class Meta:
ordering = ["-id"]
indexes = [
models.Index(fields=["short_url"]),
models.Index(fields=["long_url"]),
]

def can_be_validated(self):
"""
Expand Down

0 comments on commit a918f43

Please sign in to comment.