From e444343fadbdea91521d7abdf53c5ba7c4444453 Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Thu, 15 Dec 2022 12:50:53 +0100 Subject: [PATCH] protocol uuid factory fix --- backend/app/schemas/protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/schemas/protocol.py b/backend/app/schemas/protocol.py index 554c49e1..72f91e51 100644 --- a/backend/app/schemas/protocol.py +++ b/backend/app/schemas/protocol.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from typing import Literal, Optional -from uuid import UUID +from uuid import UUID, uuid4 import pydantic from pydantic import BaseModel @@ -20,7 +20,7 @@ class GenericTaskRequest(TaskRequest): class Task(BaseModel): """A task is a unit of work that the backend gives to the frontend.""" - id: UUID = pydantic.Field(default_factory=UUID) + id: UUID = pydantic.Field(default_factory=uuid4) type: str addressed_users: Optional[list[str]] = None