refector: 一点优化

This commit is contained in:
caoqianming 2023-04-14 16:54:10 +08:00
parent 65ff80db75
commit ba937ce751
2 changed files with 2 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class TestViewSet(CustomGenericViewSet):
'employee': '访客石非凡', 'event': '未带安全帽'})
return Response()
@idempotent()
@auto_log()
@action(methods=['post'], detail=False, serializer_class=Serializer)
def test_snap_only(self, request, pk=None):
"""通道抓图

View File

@ -76,6 +76,7 @@ class HrmService:
}
)
dhClient.request(**dhapis['person_update'], json=json_data)
ep = cls.save(ep, data={'dh_id': dh_id, 'dh_photo': dh_photo})
else:
_, res = dhClient.request(**dhapis['person_gen_id'])
dh_id = res['id']