chatovod/core/http.py
def _remove_none_params_and_data(self, req_data):
        """Filter out items in params and data where the value is None.

        aiohttp doesn't filter out None values,
        instead it converts None into string.
        """
        params = req_data.get("params")
        data = req_data.get("data")

        if params:
            if type(params) == dict:
                req_data["params"] = {k: v for k, v in params.items() if v is not None}
            elif type(params) == list:
                req_data["params"] = [(k, v) for k, v in params if v is not None]

        if data:
            if type(data) == dict:
                req_data["data"] = {k: v for k, v in data.items() if v is not None}
            elif type(data) == list:
                req_data["data"] = [(k, v) for k, v in data if v is not None]
Filter out items in params and data where the value is None.

        aiohttp doesn't filter out None values,
        instead it converts None into string.
        
Filter out items in params and data where the value is None.
aiohttp doesn't filter out None values,
instead it converts None into string.
Filter out items in params and data where the value is None . aiohttp doesn ' t filter out None values instead it converts None into string .
def _remove_none_params_and_data(self, req_data):
        params = req_data.get("params")
        data = req_data.get("data")
        if params:
            if type(params) == dict:
                req_data["params"] = {k: v for k, v in params.items() if v is not None}
            elif type(params) == list:
                req_data["params"] = [(k, v) for k, v in params if v is not None]
        if data:
            if type(data) == dict:
                req_data["data"] = {k: v for k, v in data.items() if v is not None}
            elif type(data) == list:
                req_data["data"] = [(k, v) for k, v in data if v is not None]
def _remove_none_params_and_data ( self , req_data ) : params = req_data . get ( "params" ) data = req_data . get ( "data" ) if params : if type ( params ) == dict : req_data [ "params" ] = { k : v for k , v in params . items ( ) if v is not None } elif type ( params ) == list : req_data [ "params" ] = [ ( k , v ) for k , v in params if v is not None ] if data : if type ( data ) == dict : req_data [ "data" ] = { k : v for k , v in data . items ( ) if v is not None } elif type ( data ) == list : req_data [ "data" ] = [ ( k , v ) for k , v in data if v is not None ]
Filter out items in params and data where the value is None.
Filter out items in params and data where the value is None .
"""Filter out items in params and data where the value is None.

        aiohttp doesn't filter out None values,
        instead it converts None into string.
        """
self
req_data