[UPDT] GENERAL: Eval method change (#397)

This commit is contained in:
Horilla
2024-11-26 14:24:55 +05:30
parent b0b355f10d
commit 489eded955
26 changed files with 749 additions and 61 deletions

View File

@@ -1,3 +1,4 @@
import ast
import calendar
import json
import os
@@ -866,3 +867,11 @@ def format_date(date_str):
except ValueError:
continue
raise ValueError(f"Invalid date format: {date_str}")
def eval_validate(value):
"""
Method to validate the dynamic value
"""
value = ast.literal_eval(value)
return value