Commit 87414cfd authored by lixiaofang's avatar lixiaofang

add

parent 9a147ee1
......@@ -22,13 +22,13 @@ def get_edit_tag_id_list(topic_id):
def topic_has_image(topic_id):
try:
has_image = False
query_list = Topic.objects.using(settings.SLAVE_DB_NAME).filter(id=topic_id, is_deleted=False,
is_online=True).values_list("have_face",
flat=True)
return has_image
has_image = Topic.objects.using(settings.SLAVE_DB_NAME).filter(id=topic_id, is_deleted=False,
is_online=True).values_list("have_face",
flat=True)
if has_image[0] == 1:
return True
else:
return False
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return False
......
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