]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
xmlrpc: Expose patch hash to patch_get
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 13 Dec 2016 18:47:37 +0000 (10:47 -0800)
committerStephen Finucane <stephen@that.guru>
Sun, 18 Dec 2016 22:45:45 +0000 (22:45 +0000)
Expose the patch object hash value to xmlrpc::patch_get. This is
particuarly helpful if some patche(s) have been submitted several times
but changed from e.g: RFC to a proper official patch submission. The
hash would typically be identical, but numbers would not.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/views/xmlrpc.py

index 6ef957c667e4962d1833b60c3c103c9e3275d0ad..bfbdef0ffa2b731cc5e3d538ecd436f2d26b6513 100644 (file)
@@ -263,6 +263,7 @@ def patch_to_dict(obj):
         'delegate': 'admin',
         'delegate_id': 1,
         'commit_ref': '',
+        'hash': '',
     }
 
     Args:
@@ -287,6 +288,7 @@ def patch_to_dict(obj):
         'delegate': six.text_type(obj.delegate).encode('utf-8'),
         'delegate_id': obj.delegate_id or 0,
         'commit_ref': obj.commit_ref or '',
+        'hash': obj.hash or '',
     }