diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py --- a/swh/web/browse/snapshot_context.py +++ b/swh/web/browse/snapshot_context.py @@ -1000,7 +1000,6 @@ encoding=content_data.get("encoding"), size=filesizeformat(content_data.get("length", 0)), language=content_data.get("language"), - licenses=content_data.get("licenses"), root_directory=root_directory, path=f"/{filepath}", filename=filename, diff --git a/swh/web/browse/utils.py b/swh/web/browse/utils.py --- a/swh/web/browse/utils.py +++ b/swh/web/browse/utils.py @@ -152,13 +152,11 @@ content_data = service.lookup_content(query_string) filetype = None language = None - license = None # requests to the indexer db may fail so properly handle # those cases in order to avoid content display errors try: filetype = service.lookup_content_filetype(query_string) language = service.lookup_content_language(query_string) - license = service.lookup_content_license(query_string) except Exception as exc: sentry_sdk.capture_exception(exc) mimetype = "unknown" @@ -217,10 +215,6 @@ content_data["language"] = language["lang"] else: content_data["language"] = "not detected" - if license: - content_data["licenses"] = ", ".join(license["facts"][0]["licenses"]) - else: - content_data["licenses"] = "not detected" return content_data diff --git a/swh/web/browse/views/content.py b/swh/web/browse/views/content.py --- a/swh/web/browse/views/content.py +++ b/swh/web/browse/views/content.py @@ -328,7 +328,6 @@ encoding=content_data["encoding"], size=filesizeformat(content_data["length"]), language=content_data["language"], - licenses=content_data["licenses"], root_directory=root_dir, path=f"/{path}" if path else None, filename=filename or "", diff --git a/swh/web/common/typing.py b/swh/web/common/typing.py --- a/swh/web/common/typing.py +++ b/swh/web/common/typing.py @@ -165,7 +165,6 @@ encoding: str size: str language: str - licenses: str path: Optional[str] filename: Optional[str] directory: Optional[str]