Commit 4dc871d1 authored by lixiaofang's avatar lixiaofang

add

parent 0840e780
......@@ -26,11 +26,7 @@ class TagTransfer(object):
@classmethod
def get_tag_suggest_data_list(cls, instance):
try:
results = agile_tag.AgileTagRecommendType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_RECOMMEND_TYPE.TRACTATE).values_list(
"agile_tag_type", flat=True).first()
if results:
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......@@ -93,10 +89,7 @@ class TagTransfer(object):
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.PROJECT)
results = agile_tag.AgileTagRecommendType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_RECOMMEND_TYPE.TRACTATE).values_list(
"agile_tag_type", flat=True).first()
if result and results:
if result:
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......@@ -127,10 +120,8 @@ class TagTransfer(object):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.POSITION)
results = agile_tag.AgileTagRecommendType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_RECOMMEND_TYPE.TRACTATE).values_list(
"agile_tag_type", flat=True).first()
if result and results:
if result:
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......@@ -161,10 +152,7 @@ class TagTransfer(object):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.INSTRUMENT)
results = agile_tag.AgileTagRecommendType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_RECOMMEND_TYPE.TRACTATE).values_list(
"agile_tag_type", flat=True).first()
if result and results:
if result:
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......@@ -195,10 +183,7 @@ class TagTransfer(object):
try:
result = agile_tag.AgileTagType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_TYPE.HOSPITAL)
results = agile_tag.AgileTagRecommendType.objects.filter(agile_tag_id=instance.id,
agile_tag_type=AGILE_TAG_RECOMMEND_TYPE.TRACTATE).values_list(
"agile_tag_type", flat=True).first()
if result and results:
if result:
ret_list = list()
item_dict = dict()
item_dict["id"] = getMd5Digest(str(instance.name))
......
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