diff --git a/apps/application/serializers/chat_serializers.py b/apps/application/serializers/chat_serializers.py index 4ec230b7c..21e583be0 100644 --- a/apps/application/serializers/chat_serializers.py +++ b/apps/application/serializers/chat_serializers.py @@ -472,7 +472,7 @@ class ChatRecordSerializer(serializers.Serializer): class Query(serializers.Serializer): application_id = serializers.UUIDField(required=True) chat_id = serializers.UUIDField(required=True) - order_asc = serializers.BooleanField(required=False) + order_asc = serializers.BooleanField(required=False, allow_null=True) def list(self, with_valid=True): if with_valid: diff --git a/apps/application/swagger_api/chat_api.py b/apps/application/swagger_api/chat_api.py index 32522fd94..57dc01640 100644 --- a/apps/application/swagger_api/chat_api.py +++ b/apps/application/swagger_api/chat_api.py @@ -284,6 +284,11 @@ class ChatRecordApi(ApiMixin): type=openapi.TYPE_STRING, required=True, description=_('Conversation ID')), + openapi.Parameter(name='order_asc', + in_=openapi.IN_QUERY, + type=openapi.TYPE_BOOLEAN, + required=False, + description=_('Is it ascending order')), ] @staticmethod diff --git a/apps/locales/en_US/LC_MESSAGES/django.po b/apps/locales/en_US/LC_MESSAGES/django.po index 452f51465..ef9686265 100644 --- a/apps/locales/en_US/LC_MESSAGES/django.po +++ b/apps/locales/en_US/LC_MESSAGES/django.po @@ -6764,3 +6764,6 @@ msgstr "" msgid "The network is busy, try again later." msgstr "" + +msgid "Is it ascending order" +msgstr "" \ No newline at end of file diff --git a/apps/locales/zh_CN/LC_MESSAGES/django.po b/apps/locales/zh_CN/LC_MESSAGES/django.po index 5eabfcb52..fdc1f8ac8 100644 --- a/apps/locales/zh_CN/LC_MESSAGES/django.po +++ b/apps/locales/zh_CN/LC_MESSAGES/django.po @@ -6902,4 +6902,7 @@ msgid "AI reply: " msgstr "AI 回复: " msgid "The network is busy, try again later." -msgstr "网络繁忙,请稍后再试。" \ No newline at end of file +msgstr "网络繁忙,请稍后再试。" + +msgid "Is it ascending order" +msgstr "是否升序" \ No newline at end of file diff --git a/apps/locales/zh_Hant/LC_MESSAGES/django.po b/apps/locales/zh_Hant/LC_MESSAGES/django.po index bef312532..69e39e457 100644 --- a/apps/locales/zh_Hant/LC_MESSAGES/django.po +++ b/apps/locales/zh_Hant/LC_MESSAGES/django.po @@ -6914,4 +6914,7 @@ msgid "AI reply: " msgstr "AI 回覆: " msgid "The network is busy, try again later." -msgstr "網絡繁忙,請稍後再試。" \ No newline at end of file +msgstr "網絡繁忙,請稍後再試。" + +msgid "Is it ascending order" +msgstr "是否昇冪" \ No newline at end of file