Passed
Push — master ( 05a640...f19445 )
by Alexander
03:06
created

tcms.xmlrpc.api.bugsystem.filter()   A

Complexity

Conditions 1

Size

Total Lines 12
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
# -*- coding: utf-8 -*-
2
from modernrpc.core import rpc_method
3
4
from tcms.testcases.models import BugSystem
5
6
7
__all__ = (
8
    'filter',
9
)
10
11
12
@rpc_method(name='BugSystem.filter')
13
def filter(query):  # pylint: disable=redefined-builtin
14
    """
15
    .. function:: XML-RPC BugSystem.filter(query)
16
17
        Get list of bug systems.
18
19
        :param query: Field lookups for :class:`tcms.testcases.models.BugSystem`
20
        :type query: dict
21
        :return: List of serialized :class:`tcms.testcases.models.BugSystem` objects.
22
    """
23
    return BugSystem.to_xmlrpc(query)
24