Actions
Bug #7715
closedSearching changelogs by model ID does not work
Start date:
03/19/2024
Due date:
% Done:
0%
Estimated time:
To be discussed:
No
Description
There are two major problems with searching changelogs by model ID:
- it should be an integer field, but is displayed as a select field, which does not make sense
- when you manage to put an integer into the field, it fails with HTTP 500 (this is the case both on alt an on hub, where you can use the integer field correctly, but it still fails)
Updated by Radko Krkoš 9 months ago
This is the backend trace:
Message type: CRITICAL Location: /var/mentat/venv/lib/python3.11/site-packages/hawat/base.py:519 Module: base Function: eh_internal_server_error Time: 2024-03-19 11:27:22,078 Message: INTERNAL SERVER ERROR Request: /changelogs/search?dt_from=2024-03-12+12%3A00&dt_to=&imodel=GuiUserModel&imodel_id=23&submit=Search Traceback: Traceback (most recent call last): File "/var/mentat/venv/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask_principal.py", line 199, in _decorated rv = f(*args, **kw) ^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/flask/views.py", line 107, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/hawat/view/__init__.py", line 903, in dispatch_request items = self.search(form_data) ^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/hawat/view/mixin.py", line 374, in search query = self.build_query(self.dbquery(), self.dbmodel, form_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/mentat/venv/lib/python3.11/site-packages/hawat/blueprints/changelogs/__init__.py", line 79, in build_query query = query.filter(model.model == form_args['imodel'], model.imodel_id == form_args['imodel_id']) ^^^^^^^^^^^^^^^ AttributeError: type object 'ItemChangeLogModel' has no attribute 'imodel_id'
Updated by Jakub Judiny 9 months ago
- Status changed from New to Resolved
- Assignee set to Jakub Judiny
Updated by Rajmund Hruška 9 months ago
- Status changed from Resolved to In Review
Actions