Page MenuHomeSoftware Heritage

D3373.diff
No OneTemporary

D3373.diff

diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,6 +1,6 @@
swh.core >= 0.0.95
swh.indexer >= 0.0.171
-swh.model >= 0.3.4
+swh.model >= 0.3.5
swh.scheduler >= 0.1.1
swh.search >= 0.0.4
swh.storage >= 0.8.0
diff --git a/swh/web/tests/views.py b/swh/web/tests/views.py
--- a/swh/web/tests/views.py
+++ b/swh/web/tests/views.py
@@ -16,6 +16,7 @@
from swh.model import from_disk
from swh.model.hashutil import hash_to_hex
from swh.model.model import Content
+from swh.model.from_disk import DiskBackedContent
from swh.web.common.highlightjs import get_hljs_language_from_filename
from swh.web.tests.data import get_tests_data
@@ -43,9 +44,10 @@
directory = from_disk.Directory.from_disk(path=test_contents_dir)
contents = []
- for name, obj in directory.items():
- if isinstance(obj, from_disk.Content):
- c = obj.to_model().with_data().to_dict()
+ for name, obj_ in directory.items():
+ obj = obj_.to_model()
+ if obj.object_type in [Content.object_type, DiskBackedContent.object_type]:
+ c = obj.with_data().to_dict()
c["status"] = "visible"
sha1 = hash_to_hex(c["sha1"])
if ext_key:

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 6:57 PM (11 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216505

Event Timeline