(20241218) Tags bug fix.
This commit is contained in:
@@ -188,7 +188,7 @@ class PGPaymentRequestData(BaseModel):
|
||||
frozen = True
|
||||
)
|
||||
|
||||
tags: List[Any] = Field(
|
||||
tags: List[Any] | None = Field(
|
||||
description = "any no. of tags to apply to this payment record to make search and filtering easy later",
|
||||
default = None
|
||||
)
|
||||
@@ -218,7 +218,7 @@ class PGPaymentRequestData(BaseModel):
|
||||
if currency is None: raise ValueError("invalid currency code, please use iso 4217 standard")
|
||||
return value
|
||||
|
||||
@field_validator("tags", mode = "before")
|
||||
@field_validator("tags", mode = "after")
|
||||
def null_to_empty_list(cls, value):
|
||||
return [] if value is None else value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user