调整log>400
This commit is contained in:
parent
91ec77ba5f
commit
12d631f5b7
|
@ -133,3 +133,9 @@ class HrmService:
|
|||
_, res = dhClient.request(**dhapis['card_add'], json=json_data)
|
||||
dh_face_card = res['id']
|
||||
return {'dh_id': dh_id, 'dh_photo': dh_photo, 'dh_face_card': dh_face_card}
|
||||
|
||||
def swipe(cls, data:dict):
|
||||
"""
|
||||
刷卡事件
|
||||
"""
|
||||
pass
|
|
@ -170,9 +170,9 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet):
|
|||
"monitor": settings.BASE_URL + '/api/third/dahua/mq/',
|
||||
"monitorType": "url",
|
||||
"events": [
|
||||
{
|
||||
"category": "business",
|
||||
},
|
||||
# {
|
||||
# "category": "business",
|
||||
# },
|
||||
{
|
||||
"category": "alarm",
|
||||
},
|
||||
|
|
|
@ -72,8 +72,8 @@ class DhClient:
|
|||
if raise_exception:
|
||||
raise APIException(**DH_REQUEST_ERROR)
|
||||
return 'error', DH_REQUEST_ERROR
|
||||
if settings.DEBUG:
|
||||
print_roundtrip(r)
|
||||
# if settings.DEBUG:
|
||||
# print_roundtrip(r)
|
||||
if r.status_code == 200:
|
||||
ret = r.json()
|
||||
if ret.get('code') == '27001007':
|
||||
|
|
|
@ -240,7 +240,7 @@ class MyLoggingMixin(object):
|
|||
"""
|
||||
return (
|
||||
self.logging_methods == "__all__" or request.method in self.logging_methods
|
||||
) and (response.status_code not in (401, 403))
|
||||
) and (response.status_code > 404)
|
||||
|
||||
def _clean_data(self, data):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue