Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9340916
D6867.id24881.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
724 B
Subscribers
None
D6867.id24881.diff
View Options
diff --git a/swh/deposit/utils.py b/swh/deposit/utils.py
--- a/swh/deposit/utils.py
+++ b/swh/deposit/utils.py
@@ -109,7 +109,15 @@
if isinstance(date, str):
date = iso8601.parse_date(date)
- return TimestampWithTimezone.from_dict(date).to_dict()
+ d = TimestampWithTimezone.from_dict(date).to_dict()
+
+ # Workaround while we migrate from storing offsets as (int, bool) to bytes.
+ # When the migration is done, remove this pop().
+ # offset_bytes will also need to be converted to a string (which is fine because
+ # it is always a well-formed offset)
+ d.pop("offset_bytes", None)
+
+ return d
def compute_metadata_context(swhid_reference: QualifiedSWHID) -> Dict[str, Any]:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 11:21 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216884
Attached To
D6867: Strip 'offset_bytes' from date dicts to support swh-model 4.0.0
Event Timeline
Log In to Comment