Skip to content

browse: Remove duplicated releases in snapshot content dropdown

As multiple snapshot branches can target the same release, multiple occurrences of the same release could be found in the snapshot content dropdown located in the top left part of the browse Web UI.

So ensure to remove duplicates by using the ifchanged template tag in related django template.

See https://webapp.staging.swh.network/browse/origin/directory/?origin_url=rpm://Fedora/packages/madplay showcasing the issue.

As a consequence snapshot releases are now sorted by descending order of their names and are displayed in the same order in the different parts of the Web UI.

Before: image

After: image

Edited by Antoine Lambert

Merge request reports