From b00edf218ab0614328f19c1971f1ef739eb991ce Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Tue, 8 Nov 2016 18:46:58 +0100 Subject: [PATCH] Fix: quotas should be integers #302 --- .../python/cartodb_services/cartodb_services/metrics/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/python/cartodb_services/cartodb_services/metrics/user.py b/server/lib/python/cartodb_services/cartodb_services/metrics/user.py index 1c31aae..bc78f18 100644 --- a/server/lib/python/cartodb_services/cartodb_services/metrics/user.py +++ b/server/lib/python/cartodb_services/cartodb_services/metrics/user.py @@ -88,11 +88,11 @@ class UserMetricsService: redis_prefix = self.__parse_redis_prefix(key_prefix, entity_name, service, metric, date) score = self._redis_connection.zscore(redis_prefix, date.day) - aggregated_metric += score if score else 0 + aggregated_metric += int(score) if score else 0 zero_padded_day = date.strftime(self.DAY_OF_MONTH_ZERO_PADDED) if str(date.day) != zero_padded_day: score = self._redis_connection.zscore(redis_prefix, zero_padded_day) - aggregated_metric += score if score else 0 + aggregated_metric += int(score) if score else 0 return aggregated_metric