Skip to content

Commit

Permalink
Fix extra origin in urls
Browse files Browse the repository at this point in the history
`verbose_name` is unique in each project, because we only have one remote.
`identifier` includes origin for branches and also it can point to the
same commit in tags.

Fixes readthedocs#5518
  • Loading branch information
stsewd committed Mar 22, 2019
1 parent 5ed7677 commit 82944ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readthedocs/projects/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ def __init__(self, *args, **kwargs):

default_choice = (None, '-' * 9)
all_versions = self.instance.versions.values_list(
'identifier',
'verbose_name',
flat=True
)
self.fields['default_branch'].widget = forms.Select(
choices=[default_choice] + list(all_versions),
choices=[default_choice] + list(zip(all_versions, all_versions)),
)

active_versions = self.get_all_active_versions()
Expand Down

0 comments on commit 82944ca

Please sign in to comment.