Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9749724
D4190.id14785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4190.id14785.diff
View Options
diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,5 +1,5 @@
swh.core >= 0.0.95
-swh.indexer >= 0.0.171
+swh.indexer >= 0.3.0
swh.model >= 0.5.0
swh.scheduler >= 0.1.1
swh.search >= 0.2.0
diff --git a/swh/web/common/archive.py b/swh/web/common/archive.py
--- a/swh/web/common/archive.py
+++ b/swh/web/common/archive.py
@@ -182,7 +182,7 @@
filetype = _first_element(list(idx_storage.content_mimetype_get([sha1])))
if not filetype:
return None
- return converters.from_filetype(filetype)
+ return converters.from_filetype(filetype.to_dict())
def lookup_content_language(q):
diff --git a/swh/web/tests/conftest.py b/swh/web/tests/conftest.py
--- a/swh/web/tests/conftest.py
+++ b/swh/web/tests/conftest.py
@@ -330,7 +330,9 @@
self.mimetype_indexer.run([hash_to_bytes(cnt_id)], "update-dups")
def content_get_mimetype(self, cnt_id):
- mimetype = next(self.idx_storage.content_mimetype_get([hash_to_bytes(cnt_id)]))
+ mimetype = self.idx_storage.content_mimetype_get([hash_to_bytes(cnt_id)])[
+ 0
+ ].to_dict()
return converters.from_filetype(mimetype)
def content_add_language(self, cnt_id):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 24, 6:09 PM (1 d, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217674
Attached To
D4190: Update to work with swh.storage.indexer 0.3.
Event Timeline
Log In to Comment