-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: Retrieve the dialogue record list document and confirm the parameters #2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,6 +284,11 @@ def get_request_params_api(): | |
| 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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet is mostly correct for defining API request parameters using the
In summary, the code looks good from a syntax perspective and should work as intended. For further optimization, particularly focusing on readability and completeness, additional context and detail might be helpful. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6764,3 +6764,6 @@ msgstr "" | |
|
|
||
| msgid "The network is busy, try again later." | ||
| msgstr "" | ||
|
|
||
| msgid "Is it ascending order" | ||
| msgstr "" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the provided code for
onemethod within a classQuery, there is no significant issue that can be identified. However, a minor enhancement could be made:Change:
To:
By using
NullBooleanField, you explicitly denote that this field can have three values:True,False, orNone. This aligns better with how many applications might handle null/empty boolean flags to indicate default or unspecified behavior.The rest of the code checks out well and doesn't contain irregularities or serious issues. If
with_validparameter is set toTrue, it seems you intend to include only validated data; otherwise, all records should be returned regardless.