[#4] Fix KeyError in authenticate_agency
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit

This commit is contained in:
Csaba 2024-02-28 11:04:21 +01:00
parent bbba8de7ac
commit e81dbbc39c

View file

@ -40,7 +40,7 @@ async def verify_optional_api_key(X_API_Key: Optional[str] = Header(None)):
def authenticate_agency(agency_id: str, password: str):
agency_conf_service : AgencyConfService = container['agencyconf']
agency_conf = agency_conf_service.agency_id_to_agency_conf[agency_id]
agency_conf = agency_conf_service.agency_id_to_agency_conf.get(agency_id, None)
if not agency_conf:
return False