From bfbb99634fe18c9d34edbced7640082c2ee45fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 29 Aug 2018 08:53:50 +0200 Subject: [PATCH] Added note about why we check the client version way before using it --- mydata_benchmarks/views/benchmark_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mydata_benchmarks/views/benchmark_api.py b/mydata_benchmarks/views/benchmark_api.py index 19fa3c8..c2844c5 100644 --- a/mydata_benchmarks/views/benchmark_api.py +++ b/mydata_benchmarks/views/benchmark_api.py @@ -34,6 +34,8 @@ def benchmark_submit_view(request): # TODO(Sybren): give feedback with validation errors to the caller. return JsonResponse({'message': 'The submitted data is not valid.'}, status=422) + # Check this before forwarding the request to Open Data, so that an + # out-of-date warning in the log is logged before other potential errors. client_version, client_outdated = _is_client_version_outdated(request, benchmark_data) url = opendata.url('api/benchmarks/')