From 0b5d2d94d93c001942fff59a7421a701d65659fa Mon Sep 17 00:00:00 2001 From: Saurabh Newatiya Date: Thu, 16 May 2024 10:28:22 +0530 Subject: [PATCH] minor fix --- plivo/utils/template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plivo/utils/template.py b/plivo/utils/template.py index 8570ac5a..f3b58229 100644 --- a/plivo/utils/template.py +++ b/plivo/utils/template.py @@ -1,5 +1,5 @@ from plivo.utils.validators import * -from location import Location +from plivo.utils.location import * class Parameter: @validate_args( @@ -9,7 +9,7 @@ class Parameter: payload=[optional(of_type_exact(str))], currency=[optional(of_type_exact(dict))], date_time=[optional(of_type_exact(dict))], - location=[optional(of_type_exact(dict))], + location=[optional(validate_dict_items(Location))] ) def __init__(self, type, text=None, media=None, payload=None, currency=None, date_time=None, location=None): self.type = type @@ -18,7 +18,7 @@ def __init__(self, type, text=None, media=None, payload=None, currency=None, dat self.payload = payload self.currency = Currency(**currency) if currency else None self.date_time = DateTime(**date_time) if date_time else None - self.location = Location(**location) if location else None + self.location = location class Component: @validate_args(