Skip to content

templates/show-metadata: Fix rendering error when a SWHID is missing

It exists some cases (nix and guix origins for instance) when a snapshot branch targets a revision that is missing in the archive.

In that case, SWHID for currently browsed directory is missing as such object does not exist.

So ensure to check SWHID validity when rendering show-metadata template.

See https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://guix.gnu.org/sources.json while being logged as staff.


Migrated from D6225 (view on Phabricator)

Merge request reports