mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
fix: don't pass extra to BaseModel.model_validate (#772)
This commit is contained in:
@@ -32,12 +32,15 @@ class ContextualModel(BaseModel):
|
||||
"""
|
||||
Proxy to BaseModel.model_validate, but on error re‐raise as
|
||||
ContextualValidationError including the passed context.
|
||||
|
||||
Note: Pydantic v2 does not support call-time `extra=...`; this argument
|
||||
is accepted for backward-compatibility but ignored.
|
||||
"""
|
||||
try:
|
||||
_ = extra # kept for backward-compatibility; intentionally ignored
|
||||
return super().model_validate(
|
||||
obj,
|
||||
strict = strict,
|
||||
extra = extra,
|
||||
from_attributes = from_attributes,
|
||||
context = context,
|
||||
by_alias = by_alias,
|
||||
|
||||
Reference in New Issue
Block a user