[PATCH 02/17] REST: Show 'web_url' in embedded series responses

Stephen Finucane stephen at that.guru
Tue Oct 30 22:19:01 AEDT 2018


Signed-off-by: Stephen Finucane <stephen at that.guru>
Closes: #224
Fixes: 9c179bf4c ("REST: Add 'web_url' link to API responses")
---
 patchwork/api/embedded.py                          | 3 ++-
 releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml

diff --git a/patchwork/api/embedded.py b/patchwork/api/embedded.py
index 83df0e50..72ffc68a 100644
--- a/patchwork/api/embedded.py
+++ b/patchwork/api/embedded.py
@@ -187,7 +187,8 @@ class SeriesSerializer(SerializedRelatedField):
 
         class Meta:
             model = models.Series
-            fields = ('id', 'url', 'date', 'name', 'version', 'mbox')
+            fields = ('id', 'url', 'web_url', 'date', 'name', 'version',
+                      'mbox')
             read_only_fields = fields
             versioned_field = {
                 '1.1': ('web_url', ),
diff --git a/releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml b/releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml
new file mode 100644
index 00000000..f6e9ccaa
--- /dev/null
+++ b/releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    API resources with embedded series were not showing the ``web_url`` value
+    for these series. This is now shown.
-- 
2.17.2



More information about the Patchwork mailing list