Skip to content

Commit

Permalink
Fixed error AttributeError: 'NoneType' object has no attribute 'start…
Browse files Browse the repository at this point in the history
…swith' #66
  • Loading branch information
JuanLP06 committed Jul 24, 2023
1 parent 1c9c8d8 commit c651fff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/slc_web/src/slc_web/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def validate(self, value):
Invalid: Show an invalid message
"""
super().validate(value)
if value is None or value.strip() == "":
return
if not value.startswith("http://") and not value.startswith("https://"):
raise Invalid(_("web address must start with http:// or https://"))

Expand Down

0 comments on commit c651fff

Please sign in to comment.