django-data-browser
django-data-browser copied to clipboard
Computed Column Error for Boolean Fields
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.
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'
What database and Django version are you using?
On Tue, Jun 27, 2023 at 10:35 PM Erik @.***> wrote:
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: image] https://user-images.githubusercontent.com/76848161/249291084-36aa36c3-8335-43b5-82a3-ffed3e58ba91.png
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'
— Reply to this email directly, view it on GitHub https://github.com/tolomea/django-data-browser/issues/64, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGERUHTB2T7KUDGL54UBALXNNGZRANCNFSM6AAAAAAZWFO6CI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Django version 4.0.9 Postgres version 15 Data Browser version 4.0.13
Thanks for the bug report.
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.
I can reproduce the issue with all (it also impacts durations) but the others work fine for me. Do you experience the same stack trace for those?
On Tue, Jun 27, 2023 at 10:56 PM Erik @.***> wrote:
Django version 4.0.9 Postgres version 15 Data Browser version 4.0.13
— Reply to this email directly, view it on GitHub https://github.com/tolomea/django-data-browser/issues/64#issuecomment-1610271565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGERUFJQ5VOL763HOCQMF3XNNJHDANCNFSM6AAAAAAZWFO6CI . You are receiving this because you commented.Message ID: @.***>