readthedocs.org: Sync version fails when two version end up with the same slug
When sync_versions
is called if there are two verbose_name
that endup with the same slug
this code breaks:
As example,
In [11]: VersionSlugField(populate_from='').slugify('example/')
Out[11]: 'example-'
In [12]: VersionSlugField(populate_from='').slugify('/example/')
Out[12]: 'example-'
In [13]: VersionSlugField(populate_from='').slugify('example-')
Out[13]: 'example-'
Sentry: https://sentry.io/read-the-docs/readthedocscom/issues/746103998/
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 15 (12 by maintainers)
We can’t generate slugs like this ones because all the URLs will become very ugly. Example, https://example.readthedocs.io/en/abcd-19060746/ (version) or https://abcd-19060746.readthedocs.io/en/latest/ (project).