def adduserComment(userid, pic_id, comment):
    from models import addcomment
    if (userid > 0 and pic_id > 0 and comment != ''):
        try:
            result = addcomment(comment, userid, pic_id)
            return result
        except:
            print (exc_info())
            return 0
def adduserComment(userid, pic_id, comment):
    from models import addcomment,getPicComments
    newCommentList=list()
    if (userid > 0 and pic_id > 0 and comment != ''):
        try:
            result=addcomment(comment, userid, pic_id)
            if result is not None:
                newCommentList=getPicComments(pic_id)
                return newCommentList
            else:
                return None
        except:
            print (exc_info())
            return None