Switching foreign jkey to PydanticObjectId

This commit is contained in:
ewandor committed 2025-04-16 22:38:06 +02:00
1 parent 15b77ff09f
commit 5bdb754f1c
5 files changed
+16 -13

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ from datetime import date, datetime
from typing import List, Literal, Optional
from pydantic import Field, BaseModel
from beanie import Indexed
from beanie import Indexed, PydanticObjectId
from firm.core.models import CrudDocument
from firm.core.filter import Filter, FilterSchema
@@ -39,7 +39,7 @@ class Individual(EntityType):
class Employee(BaseModel):
position: Indexed(str) = Field(title='Poste')
entity_id: str = Field(
entity_id: PydanticObjectId = Field(
foreignKey={
"reference": {
"resource": "entity",