Commit d956c534 authored by Michal Čihař's avatar Michal Čihař

Fix validation when repo is not a link

parent a4d11913
...@@ -75,7 +75,7 @@ def get_linked_repo(val): ...@@ -75,7 +75,7 @@ def get_linked_repo(val):
def validate_repo(val): def validate_repo(val):
try: try:
repo = get_linked_repo(val) repo = get_linked_repo(val)
if repo.is_repo_link(): if repo is not None and repo.is_repo_link():
raise ValidationError(_('Can not link to linked repository!')) raise ValidationError(_('Can not link to linked repository!'))
except SubProject.DoesNotExist: except SubProject.DoesNotExist:
raise ValidationError(_('Invalid link to repository!')) raise ValidationError(_('Invalid link to repository!'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment