diff --git a/RoutesApp/funcs.py b/RoutesApp/funcs.py index baabee5..cc82b73 100644 --- a/RoutesApp/funcs.py +++ b/RoutesApp/funcs.py @@ -15,6 +15,12 @@ def get_routes_Dict(user=None, data=None): 'owner': user }) + if data: + for key, val in data.items(): + if val: + if key not in ('from_address_point_txt', 'to_address_point_txt', 'csrfmiddlewaretoken', 'sort'): + kwargs.update({key: val}) + routes = Route.objects.filter(**kwargs).order_by('-modifiedDT') res_Dict = {}