Project

General

Profile

Actions

Bug #7449

closed

Cancelling creation of network record results in internal server error

Added by Rajmund Hruška over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Development - GUI
Target version:
Start date:
06/25/2021
Due date:
% Done:

100%

Estimated time:
To be discussed:
No

Description

While creating a network record for testing purpose I came across a bug when I tried creating network record. Tested on my local machine as well as mentat-alt. Here is a traceback:

Traceback (most recent call last):
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
    return view_func(**req.view_args)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/home/rajmund/mentat-ng/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/rajmund/mentat-ng/lib/vial/view/__init__.py", line 1628, in dispatch_request
    cancel_response = self.check_action_cancel(form)
  File "/home/rajmund/mentat-ng/lib/vial/view/__init__.py", line 1427, in check_action_cancel
    flask.Markup(self.get_message_cancel(**kwargs)),
  File "/home/rajmund/mentat-ng/lib/hawat/blueprints/networks/__init__.py", line 262, in get_message_cancel
    parent_id = flask.escape(str(kwargs['item'].group))
KeyError: 'item'
Actions #1

Updated by Rajmund Hruška over 3 years ago

  • Status changed from New to Resolved
  • Target version changed from Backlog to 2.9
  • % Done changed from 0 to 100

The issue was with a informative prompt which is shown after a button press. In this prompt, the group which owns the network was expected but that doesn't make sense when the network record is never created. I fixed that issue in 1e2fc0f1.

A bit annoying is that in order to press the Cancel button, all the required fields must be valid (not empty). On the other hand, it is possible to just press the back button in the browser and creating network records is only available to admins. So I wouldn't waste more time on this.

Actions #2

Updated by Rajmund Hruška about 3 years ago

  • Status changed from Resolved to In Review

Merged into devel.

Actions #3

Updated by Pavel Kácha almost 3 years ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF