Page MenuHomeSoftware Heritage

D4609.id.diff
No OneTemporary

D4609.id.diff

diff --git a/swh/deposit/api/state.py b/swh/deposit/api/state.py
--- a/swh/deposit/api/state.py
+++ b/swh/deposit/api/state.py
@@ -39,6 +39,7 @@
"swhid",
"swhid_context",
"external_id",
+ "origin_url",
)
for k in keys:
context[k] = getattr(deposit, k, None)
diff --git a/swh/deposit/templates/deposit/status.xml b/swh/deposit/templates/deposit/status.xml
--- a/swh/deposit/templates/deposit/status.xml
+++ b/swh/deposit/templates/deposit/status.xml
@@ -10,6 +10,7 @@
{% if swhid is not None %}<sd:deposit_swh_id>{{ swhid }}</sd:deposit_swh_id>{% endif %}
{% if swhid_context is not None %}<sd:deposit_swh_id_context>{{ swhid_context }}</sd:deposit_swh_id_context>{% endif %}
{% if external_id is not None %}<sd:deposit_external_id>{{ external_id }}</sd:deposit_external_id>{% endif %}
+ {% if origin_url is not None %}<sd:deposit_origin_url>{{ origin_url }}</sd:deposit_origin_url>{% endif %}
<!-- The following tags are deprecated and may be removed in the future,
as they do not belong in the http://www.w3.org/2005/Atom namespace. -->
diff --git a/swh/deposit/tests/api/test_deposit_status.py b/swh/deposit/tests/api/test_deposit_status.py
--- a/swh/deposit/tests/api/test_deposit_status.py
+++ b/swh/deposit/tests/api/test_deposit_status.py
@@ -38,6 +38,7 @@
== DEPOSIT_STATUS_DETAIL[DEPOSIT_STATUS_DEPOSITED]
)
assert r["swh:deposit_external_id"] == deposit.external_id
+ assert r["swh:deposit_origin_url"] == deposit.origin_url
def test_status_unknown_deposit(authenticated_client, deposit_collection):
@@ -123,3 +124,4 @@
assert r["swh:deposit_swh_id"] == deposit.swhid
assert deposit.swhid_context is not None
assert r["swh:deposit_swh_id_context"] == deposit.swhid_context
+ assert r["swh:deposit_origin_url"] == deposit.origin_url

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 1:59 PM (8 h, 14 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219981

Event Timeline