NaN cell values cause field aggregations to crash
Describe the problem
In a formula if you do a divide by zero like 1/0
NaN's are stored in the cells. However if you then apply a view aggregation you will get an error:
ValueError: Out of range float values are not JSON compliant
File "django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "django/core/handlers/base.py", line 204, in _get_response
response = response.render()
File "django/template/response.py", line 105, in render
self.content = self.rendered_content
File "rest_framework/response.py", line 70, in rendered_content
ret = renderer.render(self.data, accepted_media_type, context)
File "rest_framework/renderers.py", line 103, in render
allow_nan=not self.strict, separators=separators
File "rest_framework/utils/json.py", line 25, in dumps
return json.dumps(*args, **kwargs)
File "__init__.py", line 238, in dumps
**kw).encode(obj)
File "json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
Expected result
View aggregations should filter out NaN's when aggregating numbers!