diff --git a/graphite_api/app.py b/graphite_api/app.py index 6a46b13..46eb5b1 100644 --- a/graphite_api/app.py +++ b/graphite_api/app.py @@ -282,8 +282,10 @@ def render(): request_options['jsonp'] = RequestParams['jsonp'] if 'maxDataPoints' in RequestParams: try: - request_options['maxDataPoints'] = int( - float(RequestParams['maxDataPoints'])) + if RequestParams['maxDataPoints'] == 'auto': + pass + else: + request_options['maxDataPoints'] = int(float(RequestParams['maxDataPoints'])) except ValueError: errors['maxDataPoints'] = 'Must be an integer.' if 'noNullPoints' in RequestParams: