From 618cd7ff162362b8c983ea3b0031479747695a3c Mon Sep 17 00:00:00 2001 From: pycook Date: Mon, 11 Nov 2019 00:25:22 +0800 Subject: [PATCH] vue lint --- api/lib/cmdb/const.py | 7 +++++-- api/lib/cmdb/value.py | 2 ++ docker-compose.yml | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/lib/cmdb/const.py b/api/lib/cmdb/const.py index ffeabae..d7e0b39 100644 --- a/api/lib/cmdb/const.py +++ b/api/lib/cmdb/const.py @@ -1,5 +1,8 @@ # -*- coding:utf-8 -*- + +from __future__ import unicode_literals + import datetime import six @@ -37,8 +40,8 @@ type_map = { 'deserialize': { Attribute.INT: string2int, Attribute.FLOAT: float, - Attribute.TEXT: escape, - Attribute.TIME: escape, + Attribute.TEXT: lambda x: escape(x).encode('utf-8').decode('utf-8'), + Attribute.TIME: lambda x: escape(x).encode('utf-8').decode('utf-8'), Attribute.DATETIME: str2datetime, Attribute.DATE: str2datetime, }, diff --git a/api/lib/cmdb/value.py b/api/lib/cmdb/value.py index c320644..a9eb4fe 100644 --- a/api/lib/cmdb/value.py +++ b/api/lib/cmdb/value.py @@ -1,6 +1,8 @@ # -*- coding:utf-8 -*- +from __future__ import unicode_literals + import markupsafe from flask import abort diff --git a/docker-compose.yml b/docker-compose.yml index 2ac8c46..dadc603 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,7 +61,6 @@ services: CMDB_API_HOST: cmdb-api:5000 NGINX_PORT: 80 volumes: - - "$PWD/conf.d:/etc/nginx/conf.d" - ./docs/nginx.cmdb.conf.example:/etc/nginx/conf.d/nginx.cmdb.conf.example command: - /bin/bash