UndefinedFunction: function round(double precision, integer) does not exist
LINE 1: ... WHEN (2='NaN'::numeric) THEN 'NaN'::numeric ELSE round(((CO...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
ProgrammingError: function round(double precision, integer) does not exist
LINE 1: ... WHEN (2='NaN'::numeric) THEN 'NaN'::numeric ELSE round(((CO...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
File "django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "contextlib.py", line 79, in inner
return func(*args, **kwds)
File "baserow/api/decorators.py", line 96, in func_wrapper
return func(*args, **kwargs)
File "baserow/contrib/database/api/fields/views.py", line 419, in patch
field, related_fields = action_type_registry.get_by_type(
File "baserow/contrib/database/fields/actions.py", line 97, in do
field, updated_fields = FieldHandler().update_field(
File "baserow/contrib/database/fields/handler.py", line 542, in update_field
to_field_type.after_update(
File "baserow/contrib/database/fields/field_types.py", line 3122, in after_update
to_model.objects_and_trash.all().update(**{f"{to_field.db_column}": expr})
File "django/db/models/query.py", line 783, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
File "django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
{"formula": "if(
and(
not(
isblank(lookup("Invested in", "Partners"))
),
count(lookup("Invested in", "Partners")) > 0
),
round(
divide(
multiply(
sum(lookup("Invested in", "Committed capital")),
0.01
),
trunc(count(lookup("Invested in", "Partners")))
),
2
),
0
)
", "name": "aaa", "number_decimal_places": 2, "type": "formula"}