Open
Conversation
731da2d to
5a3a57e
Compare
akatsoulas
reviewed
Mar 2, 2026
Collaborator
akatsoulas
left a comment
There was a problem hiding this comment.
Thanks @denyshon for the PR! I added a couple of comment
| "description": "Test description", | ||
| "category": "", # Empty category | ||
| } | ||
| # An empty category field will result in a form validation error in send()->save(). |
Collaborator
There was a problem hiding this comment.
Given the change in the model, the empty category shouldn't raise a validation error
Contributor
Author
There was a problem hiding this comment.
@akatsoulas It raises a form (not model) validation error, because the field is still required (and from the form perspective cannot be empty)
5a3a57e to
6c2d272
Compare
Switch ZendeskForm from Form to ModelForm to benefit from model validation. Specify SupportTicket.description max_length based on the Zendesk API. Set blank=True for SupportTicket.category to prevent a model validation error in case we decide to make this field optional. Adjust kitsune.customercare.tests.test_forms.ZendeskFormTests.test_send_with_no_category_selected to ignore a form validation error.
6c2d272 to
7f286c9
Compare
Contributor
Author
|
@akatsoulas Thank you for the review! I've replied to your comment and rebased the patch onto the latest main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
max_lengthbased on the Zendesk API.blank=Truefor SupportTicket.category to prevent a model validation error in case we decide to make this field optional.Resolves #2806.