Skip to content

Commit 9ba9ec1

Browse files
committed
chore(chart): Added allowed period arguments to dto
1 parent 647999e commit 9ba9ec1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chart/schemas/currency.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
This module provides a model for handling currency conversion operations.
33
"""
44
from datetime import date
5-
from typing import Optional
5+
from typing import Optional, Literal
66

7-
from pydantic import BaseModel, Field, root_validator
7+
from pydantic import BaseModel, Field
88

99
class Currency(BaseModel):
1010
"""
@@ -34,7 +34,7 @@ class Currency(BaseModel):
3434
default=None,
3535
description='End of period'
3636
)
37-
period: Optional[str] = Field(
37+
period: Optional[Literal['week', 'month', 'quarter', 'year']] = Field(
3838
default=None,
3939
description='Date Period.' \
4040
'Arguments week/month/quarter/year are accepted'

0 commit comments

Comments
 (0)