Skip to content

Commit 82944ca

Browse files
committed
Fix extra origin in urls
`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
1 parent 5ed7677 commit 82944ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/projects/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ def __init__(self, *args, **kwargs):
232232

233233
default_choice = (None, '-' * 9)
234234
all_versions = self.instance.versions.values_list(
235-
'identifier',
236235
'verbose_name',
236+
flat=True
237237
)
238238
self.fields['default_branch'].widget = forms.Select(
239-
choices=[default_choice] + list(all_versions),
239+
choices=[default_choice] + list(zip(all_versions, all_versions)),
240240
)
241241

242242
active_versions = self.get_all_active_versions()

0 commit comments

Comments
 (0)