]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
xmlrpc: Remove 'bundle_to_dict'
authorStephen Finucane <stephen@that.guru>
Thu, 23 Mar 2017 13:24:59 +0000 (13:24 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 5 Apr 2017 10:10:15 +0000 (11:10 +0100)
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 <stephen@that.guru>
patchwork/views/xmlrpc.py

index 0d438ef40c4adc1b656688738a2c6a2ebbd237fe..927ec9c221e4a30cb3439f0cb9e077b899d88642 100644 (file)
@@ -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.