Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computed Column Error for Boolean Fields #64

Open
ErikUmble opened this issue Jun 27, 2023 · 3 comments
Open

Computed Column Error for Boolean Fields #64

ErikUmble opened this issue Jun 27, 2023 · 3 comments

Comments

@ErikUmble
Copy link

Boolean fields have the option for all, average, sum, and is_null columns to display, but the first three of these cause an error 500.

image

Traceback (most recent call last):
  File "e:\Homestead_App\.venv\lib\site-packages\django\core\handlers\exception.py", line 55, in inner
    response = get_response(request)
  File "e:\Homestead_App\.venv\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\eriku\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "e:\Homestead_App\.venv\lib\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\views.py", line 265, in query
    return _data_response(request, query, media, privileged=True)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\views.py", line 295, in _data_response
    bound_query = BoundQuery.bind(query, orm_models)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\query.py", line 233, in bind
    orm_bound_field = get_orm_field(query_field.path)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\query.py", line 223, in get_orm_field
    orm_bound_field = orm_field.bind(orm_bound_field)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\orm_aggregates.py", line 104, in bind
    agg_func = _get_django_aggregate(previous.type_, self.name)
  File "e:\Homestead_App\.venv\lib\site-packages\data_browser\orm_aggregates.py", line 72, in _get_django_aggregate
    return {
KeyError: 'all'
@tolomea
Copy link
Owner

tolomea commented Jun 27, 2023 via email

@ErikUmble
Copy link
Author

Django version 4.0.9
Postgres version 15
Data Browser version 4.0.13

@tolomea
Copy link
Owner

tolomea commented Jul 1, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants