Skip to content

Commit e2671f1

Browse files
committed
minor cleanup
1 parent bcdf445 commit e2671f1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

shortener/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ def clean_custom(self):
1919
if not custom:
2020
return
2121

22+
# they specified a custom url to shorten to. verify that we can decode
23+
# that shortened form, and that it's not already taken
2224
try:
2325
id = base62.to_decimal(custom)
2426
except DecodingError as e:
2527
raise forms.ValidationError(e)
2628

27-
# make sure this custom alias is not alrady taken
2829
try:
2930
if Link.objects.filter(id=id).exists():
3031
raise forms.ValidationError('"%s" is already taken' % custom)

shortener/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import datetime
2-
31
from django.db import models
42
from django.conf import settings
53

0 commit comments

Comments
 (0)