Skip to content

Commit

Permalink
Merge pull request #43 from SmartReports/dev
Browse files Browse the repository at this point in the history
paul
  • Loading branch information
matteotolloso authored Nov 27, 2023
2 parents 97a119a + 1fa7e8b commit bdb6977
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion smartreport/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,10 @@
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
EMAIL_USE_SSL = True


DEFAULT_FILE_STORAGE = 'django_storage_supabase.supabase'
SUPABASE_API_KEY = os.environ.get('SUPABASE_ANON_KEY')
SUPABASE_URL = "https://khjwjcfckbsfpvdmcrak.supabase.co"
SUPABASE_ROOT_PATH = '/smartreports/'
4 changes: 4 additions & 0 deletions smartreport_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def __init__(self, **kwargs: Any) -> None:

def list(self, request):
params = request.query_params

if 'kpis' not in params or params.getlist("kpis") == []:
return Response({"message": "The required parameter 'kpis' is missing"}, status=status.HTTP_400_BAD_REQUEST)

list_of_internal_ids = params.getlist("kpis")[0].split(',') # list of kpis to show in the plot

queryset = Kpi.objects.filter(id__in=list_of_internal_ids)
Expand Down

0 comments on commit bdb6977

Please sign in to comment.