From: Stephen Finucane Date: Thu, 23 Mar 2017 13:24:59 +0000 (+0000) Subject: xmlrpc: Remove 'bundle_to_dict' X-Git-Tag: v2.0.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ba1708d188293fa55f8fa029704ca5dbbf3b8b;p=thirdparty%2Fpatchwork.git xmlrpc: Remove 'bundle_to_dict' Turns out this function is not called anywhere nor has it been called since being introduced in '83964878'. Given that we're now focused on the REST API, we can simply remove this. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/views/xmlrpc.py b/patchwork/views/xmlrpc.py index 0d438ef4..927ec9c2 100644 --- a/patchwork/views/xmlrpc.py +++ b/patchwork/views/xmlrpc.py @@ -291,33 +291,6 @@ def patch_to_dict(obj): } -def bundle_to_dict(obj): - """Serialize a bundle object. - - Return a trimmed down dictionary representation of a Bundle - object which is safe to send to the client. For example: - - { - 'id': 1, - 'name': 'New', - 'n_patches': 2, - 'public_url': 'http://patchwork.example.com/bundle/admin/stuff/mbox/', - } - - Args: - Bundle object to serialize. - - Returns: - Serialized Bundle object. - """ - return { - 'id': obj.id, - 'name': obj.name, - 'n_patches': obj.patches.count(), - 'public_url': obj.get_mbox_url(), - } - - def state_to_dict(obj): """Serialize a state object.