Commit 87414cfd authored by lixiaofang's avatar lixiaofang

add

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