Project

General

Profile

Actions

Bug #7715

closed

Searching changelogs by model ID does not work

Added by Jakub Judiny 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Development - GUI
Target version:
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)

Actions #1

Updated by Radko Krkoš 2 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'
Actions #2

Updated by Jakub Judiny 2 months ago

  • Target version changed from 2.13 to 2.12.1
Actions #3

Updated by Jakub Judiny 2 months ago

  • Status changed from New to Resolved
  • Assignee set to Jakub Judiny
Actions #4

Updated by Rajmund Hruška 2 months ago

  • Status changed from Resolved to In Review
Actions #5

Updated by Rajmund Hruška about 2 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF