Commit f76cff30 authored by 段英荣's avatar 段英荣

modify bug

parent 81d19b1f
......@@ -87,8 +87,10 @@ class DoctorTransfer(object):
for i in cut_word:
if keyword.find(i) >= 0:
cut_bool = True
item_dict = dict()
suggest_list = list()
if cut_bool == False:
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["ori_name"] = instance.name
item_dict["is_online"] = instance.is_online
......@@ -106,4 +108,4 @@ class DoctorTransfer(object):
return (item_dict, suggest_list)
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return ([], [])
return (dict(), list())
......@@ -26,6 +26,9 @@ class HospitalTransfer(object):
for i in cut_word:
if name.find(i) >= 0:
cut_bool = True
item_dict = dict()
suggest_list = list()
if cut_bool == False:
item_dict = dict()
item_dict["id"] = getMd5Digest(str(name))
......@@ -45,7 +48,7 @@ class HospitalTransfer(object):
return (item_dict, suggest_list)
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return ([], [])
return (dict(), list())
@classmethod
def get_hospital_lat_lng_info_to_redis(cls, instance):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment