]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
REST: Show 'web_url' in embedded series responses
authorStephen Finucane <stephen@that.guru>
Fri, 26 Oct 2018 20:35:03 +0000 (21:35 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 22 Dec 2018 18:13:35 +0000 (18:13 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #224
Fixes: 9c179bf4c ("REST: Add 'web_url' link to API responses")
(cherry picked from commit ee58fb3be6eaa0deeae966ef3b95fc757df4519b)

patchwork/api/embedded.py
releasenotes/notes/issue-224-8f1c4207aa273ac6.yaml [new file with mode: 0644]

index 314a27fedcb7b16c0bcfb7bacf983ec6733904b7..f1105b892004358487ce9458b2e23442d5cd0a69 100644 (file)
@@ -201,7 +201,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 (file)
index 0000000..f6e9cca
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    API resources with embedded series were not showing the ``web_url`` value
+    for these series. This is now shown.