aiteamutils 0.2.113__py3-none-any.whl → 0.2.114__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aiteamutils/validators.py
CHANGED
@@ -244,12 +244,17 @@ def date_validator(*field_names: str):
|
|
244
244
|
"""
|
245
245
|
def decorator(cls):
|
246
246
|
for field_name in field_names:
|
247
|
+
field = cls.model_fields.get(field_name)
|
248
|
+
if field:
|
249
|
+
field.annotation = Optional[date]
|
250
|
+
field.default = None
|
251
|
+
|
247
252
|
@field_validator(field_name, mode='before')
|
248
253
|
@classmethod
|
249
254
|
def validate(cls, value: Any, info: Any) -> Any:
|
255
|
+
if value == "" or value is None:
|
256
|
+
return None
|
250
257
|
try:
|
251
|
-
if value == "" or value is None:
|
252
|
-
return None
|
253
258
|
return Validator.validate_date(value, field_name)
|
254
259
|
except CustomException as e:
|
255
260
|
raise e
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.114"
|
@@ -8,8 +8,8 @@ aiteamutils/database.py,sha256=SmE6JiyQoqCNlrV4AVxrp1tsrNryyZSQWJM0dHN4MQA,19696
|
|
8
8
|
aiteamutils/enums.py,sha256=7WLqlcJqQWtETAga2WAxNp3dJTQIAd2TW-4WzkoHHa8,2498
|
9
9
|
aiteamutils/exceptions.py,sha256=pgf3ersezObyl17wAO3I2fb8m9t2OzWDX1mSjwAWm2Y,16035
|
10
10
|
aiteamutils/security.py,sha256=McUl3t5Z5SyUDVUHymHdDkYyF4YSeg4g9fFMML4W6Kw,11630
|
11
|
-
aiteamutils/validators.py,sha256=
|
12
|
-
aiteamutils/version.py,sha256=
|
13
|
-
aiteamutils-0.2.
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
11
|
+
aiteamutils/validators.py,sha256=kSOO9Qrt31BhZL2APRGnly1OGA1ap73-ET4L5dsL-J0,11795
|
12
|
+
aiteamutils/version.py,sha256=_6Ui4HKIULtzFLH1hc7dhBL7e9OX6LJvC6zQMM253cg,43
|
13
|
+
aiteamutils-0.2.114.dist-info/METADATA,sha256=_2fDFRhIWqCrgXU0DlcBxdimU9m6cp7VvcF5te_8yF0,1719
|
14
|
+
aiteamutils-0.2.114.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
aiteamutils-0.2.114.dist-info/RECORD,,
|
File without changes
|