Follow advice from pydantic v2 migration guide and fix test

Merge request reports

Loading