-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: The maximum limit for application dialogue has been modified to 10000000 times #4302
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
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| access_num = serializers.IntegerField(required=False, max_value=10000000, | ||
| min_value=0, | ||
| label=_("Number of visits")) | ||
| white_active = serializers.BooleanField(required=False, |
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.
The access_num field's max_value is set to 1,000, which may not be the intended constraint. Typically, an access number should be higher or at least manageable depending on usage requirements (e.g., one million accesses per token). Here's a revised version:
- Increase Maximum Value: The maximum value can be increased based on expected usage.
- Documentation Update: A note about this adjustment should be included in the Django REST Framework documentation.
class AccessTokenEditSerializer(serializers.Serializer):
"""
A serializer for editing access tokens with additional fields such as reset, activation status, and visit count.
"""
# ...Revision Summary: Increase max_value from 1,000 to a more suitable upper bound like 10,000,000 or even higher if needed. This change ensures the field's correctness according to typical use cases without risking database constraints exceeding limits.
| :max="10000000" | ||
| :value-on-clear="0" | ||
| controls-position="right" | ||
| style="width: 268px" |
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 snippet, there is one change to optimize performance and reduce user input errors:
- :max="10000"
+ :max="10000000"Modification Explanation: The max prop from 10,000 to 10,000,000 increases the range of values that users can enter into the input field. This allows for more flexible data entry without exceeding typical limits (e.g., for numerical IDs). Adjusting this value ensures that potential future requirements or constraints are considered.
This change does not introduce irregularities or significant issues, but it enhances the flexibility of the form component by accommodating larger inputs, which could be beneficial depending on specific use cases.
fix: The maximum limit for application dialogue has been modified to 10000000 times