Skip to content

Commit

Permalink
Remove unused StripURLField & Version.string_to_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Apr 30, 2020
1 parent 74b42be commit 0b45e89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
7 changes: 0 additions & 7 deletions tcms/core/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,3 @@ def clean(self, value):
(Q(email=value) | Q(username=value)))
except User.DoesNotExist:
raise ValidationError('Unknown user: "%s"' % value)


class StripURLField(forms.URLField):
def to_python(self, value):
if isinstance(value, str):
value = value.strip()
return super(StripURLField, self).to_python(value)
8 changes: 0 additions & 8 deletions tcms/management/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ class Meta:
def __str__(self):
return self.value

@classmethod
def string_to_id(cls, product_id, value):
try:
return cls.objects.get(product_id=product_id,
value=value).pk
except cls.DoesNotExist:
return None


class Build(TCMSActionModel):
name = models.CharField(max_length=255)
Expand Down

0 comments on commit 0b45e89

Please sign in to comment.