|
@@ -855,6 +855,18 @@ def deleteInterface(request):
|
|
|
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|
|
|
+ now_time = int(time.time())
|
|
|
+ ip = CommonService.get_ip_address(request)
|
|
|
+ log = {
|
|
|
+ 'ip': ip,
|
|
|
+ 'user_id': 1,
|
|
|
+ 'status': 200,
|
|
|
+ 'time': now_time,
|
|
|
+ 'content': 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)),
|
|
|
+ 'url': 'equipment/delete',
|
|
|
+ 'operation': '{}删除设备失败,uid:{}'.format(userID, uid),
|
|
|
+ }
|
|
|
+ LogModel.objects.create(**log)
|
|
|
return response.json(176, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|
|
|
|