Commit 65af1022 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix code

See merge request !282
parents 112c30cd db396e88
......@@ -8,14 +8,14 @@ class ReplyListView(APIView):
def get(self, request):
page = int(request.GET.get('page', 1))
limit = int(request.GET.get('limit', 10))
id_ = int(request.GET.get('id', 0))
id_ = request.GET.get('id', None)
content = request.GET.get('content', None)
topic_content = request.GET.get('topic_content', None)
user_name = request.GET.get('user_name', None)
belong_type = request.GET.get('belong_type', None)
reply_level = request.GET.get('reply_level', None)
reply_user_type = int(request.GET.get('reply_user_type', 0))
replied_user_type = int(request.GET.get('replied_user_type', 0))
reply_user_type = request.GET.get('reply_user_type', None)
replied_user_type = request.GET.get('replied_user_type', None)
is_online = request.GET.get('is_online', None)
from_create_time = request.GET.get('from_create_time', None)
to_create_time = request.GET.get('to_create_time', None)
......@@ -25,10 +25,14 @@ class ReplyListView(APIView):
other_filters = {}
if topic_content:
other_filters['topic_content'] = topic_content
if reply_user_type and reply_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]:
other_filters['reply_user_type'] = reply_user_type
if replied_user_type and replied_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]:
other_filters['replied_user_type'] = replied_user_type
if reply_user_type:
reply_user_type = int(reply_user_type)
if reply_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]:
other_filters['reply_user_type'] = reply_user_type
if replied_user_type:
replied_user_type = int(replied_user_type)
if replied_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]:
other_filters['replied_user_type'] = replied_user_type
if from_topic_create_time and to_topic_create_time:
other_filters['topic_create_time__gte'] = from_topic_create_time
other_filters['topic_create_time__lte'] = to_topic_create_time
......@@ -36,7 +40,7 @@ class ReplyListView(APIView):
other_filters['user_name'] = user_name
filters = {}
if id_:
filters['id'] = id_
filters['id'] = int(id_)
if content:
filters['content__contains'] = content
if belong_type:
......
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