Page MenuHomeSoftware Heritage

D6867.id24881.diff
No OneTemporary

D6867.id24881.diff

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

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

Event Timeline