Skip to content

Commit 71d1f10

Browse files
committed
FIX: Fix compatibility with FastAPI < 0.78.0
Prior to FastAPI 0.78.0, the Form() object required explicit setting with eclipse when a form field is required. As the FastAPI in Debian 11 repository is older, we need to support it
1 parent 54b7fec commit 71d1f10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

intelmq_api/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def config(file: str, fetch: bool = False,
137137

138138

139139
@api.post("/api/login", status_code=status.HTTP_200_OK, response_model=TokenResponse)
140-
def login(username: str = Form(), password: str = Form(),
140+
def login(username: str = Form(...), password: str = Form(...),
141141
session: session.SessionStore = Depends(session_store)):
142142
if session is None:
143143
raise HTTPException(

0 commit comments

Comments
 (0)