Skip to content
Snippets Groups Projects
Commit 67d40448 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

utils/citation: Fix citation source SWHID when browsing a directory

parent 73b843e1
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,11 @@ def _get_bibtex_from_intrinsic_citation_metadata(
source_swhid_params["visit"] = swhid.visit
if swhid.anchor:
source_swhid_params["anchor"] = swhid.anchor
elif swhid.object_type in (ObjectType.RELEASE, ObjectType.REVISION):
elif swhid.object_type in (
ObjectType.DIRECTORY,
ObjectType.RELEASE,
ObjectType.REVISION,
):
source_swhid_params["anchor"] = CoreSWHID(
object_type=swhid.object_type, object_id=swhid.object_id
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment