Commit 17e344ac authored by 段英荣's avatar 段英荣

modify

parent d05df1be
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, print_function
import os
import sys
import logging
......@@ -17,7 +19,15 @@ class TagTransfer(object):
res = dict()
res["id"] = instance.id
res["suggest"] = instance.name
tag_name_terms_list = list()
for i in range(len(instance.name)):
for j in range(i,len(instance.name)+1):
name_term = instance.name[i:j].strip()
if name_term:
tag_name_terms_list.append(name_term)
res["suggest"] = tag_name_terms_list
res["name"] = instance.name
res["is_online"] = instance.is_online
res["is_deleted"] = instance.is_deleted
......
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