-
Notifications
You must be signed in to change notification settings - Fork 45
430 Fix bug with optional fields in custom forms #432
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
Merged
dantownsend
merged 14 commits into
master
from
430-fix-bug-with-optional-fields-in-custom-forms
Jan 16, 2025
Merged
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
15f159e
fix bug with optional fields in custom forms
dantownsend 91aa49b
try older Ubuntu version for Playwright tests
dantownsend a5500bf
fix linter errors
dantownsend c016a4b
remove fastapi version pin
dantownsend 4d8eef0
ignore linter errors
dantownsend 9d90273
add logic to work out if form fields are optional
dantownsend a3bc19f
added a mega form for testing
dantownsend 619f4fc
fix a small bug with resetting the form
dantownsend 799f9b7
allow new line characters in form response
dantownsend 8b112d1
update unit tests with new form
dantownsend e3bfdee
rename form
dantownsend 05b5cf0
add a playwright test
dantownsend bc94e1b
refactor so It's backwards compatible
dantownsend ea38080
Merge branch 'master' into 430-fix-bug-with-optional-fields-in-custom…
dantownsend File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,13 +100,13 @@ class GroupItem(BaseModel): | |
|
|
||
|
|
||
| class GroupedTableNamesResponseModel(BaseModel): | ||
| grouped: t.Dict[str, t.List[str]] = Field(default_factory=list) | ||
| grouped: t.Dict[str, t.List[str]] = Field(default_factory=dict) | ||
| ungrouped: t.List[str] = Field(default_factory=list) | ||
|
|
||
|
|
||
| class GroupedFormsResponseModel(BaseModel): | ||
| grouped: t.Dict[str, t.List[FormConfigResponseModel]] = Field( | ||
| default_factory=list | ||
| default_factory=dict | ||
| ) | ||
| ungrouped: t.List[FormConfigResponseModel] = Field(default_factory=list) | ||
|
|
||
|
|
@@ -680,7 +680,7 @@ def __init__( | |
|
|
||
| private_app.add_route( | ||
| path="/change-password/", | ||
| route=change_password( | ||
| route=change_password( # type: ignore | ||
|
Member
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. I'm pretty sure the Starlette type annotations are wrong here - we're just passing in a |
||
| login_url="./../../public/login/", | ||
| session_table=session_table, | ||
| read_only=read_only, | ||
|
|
@@ -786,7 +786,7 @@ def __init__( | |
|
|
||
| public_app.add_route( | ||
| path="/logout/", | ||
| route=session_logout(session_table=session_table), | ||
| route=session_logout(session_table=session_table), # type: ignore | ||
|
Member
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. See above about type annotations. |
||
| methods=["POST"], | ||
| ) | ||
|
|
||
|
|
||
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
Oops, something went wrong.
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.
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.
It looks like Playwright isn't running out of the box on Ubuntu 24.04 at the moment due to some missing dependencies.
microsoft/playwright#30368