def list(self, request, **kwargs): try: ipaddress = request.query_params.get('ipaddress', None) context = Vulnerability.list(ipaddress=ipaddress) except Exception as E: logger.error(E) context = data_return(500, CODE_MSG.get(500), []) return Response(context)
def list(self, request, **kwargs): try: hid = int(request.query_params.get('hid', -1)) context = Vulnerability.list(hid=hid) except Exception as E: logger.error(E) context = data_return(500, CODE_MSG.get(500), []) return Response(context)