annuaire-entreprises-data-gouv-fr / search-api

MIT License
16 stars 2 forks source link

[BUG]fix(response): return empty dict if immat is null #420

Closed HAEKADI closed 2 weeks ago

HAEKADI commented 2 weeks ago

When immatriculation is null, typically for non-diffusible items, the API returns an error because None is not considered a valid value in the Pydantic model for this object. This PR introduces support for the None option. Additionally, "La Poste" is missing from the RNE stock, resulting in an empty immatriculation object and a null value for date_mise_a_jour_rne. This causes the end-to-end tests to fail, as "La Poste" is used in many test cases.