1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 17:16:59 -05:00

Introduce ical action on MealPlanViewSet to expose ical format for listing meal plans.

This commit is contained in:
Anand Patel
2024-03-16 05:28:16 +00:00
parent e78dd305f3
commit ffe02bf210
4 changed files with 113 additions and 92 deletions

View File

@@ -14,8 +14,11 @@ class QueryParam(object):
class QueryParamAutoSchema(AutoSchema):
def is_query(self, path, method):
return is_list_view(path, method, self.view)
def get_path_parameters(self, path, method):
if not is_list_view(path, method, self.view):
if not self.is_query(path, method):
return super().get_path_parameters(path, method)
parameters = super().get_path_parameters(path, method)
for q in self.view.query_params: