teamfishydino / quizapp

FastAPI & SvelteKit Quiz Application
2 stars 1 forks source link

bugfix(backend): fix quiz schema to save questions and tags in order #57

Open acsolle66 opened 2 months ago

acsolle66 commented 2 months ago

The current quiz schema uses a set in the Pydantic model to enforce uniqueness for quiz questions. However, this leads to an issue where the questions and tags lose their order since sets are unordered collections. The goal is to switch to using a list while maintaining uniqueness through a custom Pydantic validator that removes duplicates.

Problem:

Solution:

Requirements:

Acceptance Criteria:

Additional Notes: