Ensure sub label is null when submitting an empty string (#16779)

* null sub_label when submitting an empty string

* prevent cancel from submitting form

* fix test
This commit is contained in:
Josh Hawkins
2025-02-24 07:02:36 -07:00
committed by GitHub
parent 9414e001f3
commit 1d8f1bd7ae
3 changed files with 17 additions and 13 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ class TestHttp(unittest.TestCase):
event = client.get(f"/events/{id}").json()
assert event
assert event["id"] == id
assert event["sub_label"] == ""
assert event["sub_label"] == None
def test_sub_label_list(self):
app = create_fastapi_app(