Skip to content
Snippets Groups Projects
Commit 5f264e00 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Fix: Remove replace function from endpoints creation. (Redmine issue: #7466)

parent 92b75ed2
No related branches found
No related tags found
No related merge requests found
...@@ -1306,16 +1306,12 @@ class ItemShowView(RenderableView): # pylint: disable=locally-disabled,abstract ...@@ -1306,16 +1306,12 @@ class ItemShowView(RenderableView): # pylint: disable=locally-disabled,abstract
'home', 'home',
endpoint = flask.current_app.config['ENDPOINT_HOME'] endpoint = flask.current_app.config['ENDPOINT_HOME']
) )
if cls.module_name != 'groups' and cls.get_view_endpoint_name() != 'show_by_name': action_menu.add_entry(
action_menu.add_entry( 'endpoint',
'endpoint', 'list',
'list', endpoint = '{}.list'.format(cls.module_name),
endpoint = '{}.{}'.format( paramlist = []
cls.module_name, )
cls.get_view_endpoint_name().replace('show', 'list')
),
paramlist = []
)
action_menu.add_entry( action_menu.add_entry(
'endpoint', 'endpoint',
'show', 'show',
...@@ -1593,10 +1589,7 @@ class ItemCreateView(ItemActionView): # pylint: disable=locally-disabled,abstra ...@@ -1593,10 +1589,7 @@ class ItemCreateView(ItemActionView): # pylint: disable=locally-disabled,abstra
breadcrumbs_menu.add_entry( breadcrumbs_menu.add_entry(
'endpoint', 'endpoint',
'list', 'list',
endpoint = '{}.{}'.format( endpoint = '{}.list'.format(cls.module_name)
cls.module_name,
cls.get_view_endpoint_name().replace('create', 'list')
),
) )
breadcrumbs_menu.add_entry( breadcrumbs_menu.add_entry(
'endpoint', 'endpoint',
...@@ -2112,18 +2105,12 @@ class ItemUpdateView(ItemActionView): # pylint: disable=locally-disabled,abstra ...@@ -2112,18 +2105,12 @@ class ItemUpdateView(ItemActionView): # pylint: disable=locally-disabled,abstra
breadcrumbs_menu.add_entry( breadcrumbs_menu.add_entry(
'endpoint', 'endpoint',
'list', 'list',
endpoint = '{}.{}'.format( endpoint = '{}.list'.format(cls.module_name)
cls.module_name,
cls.get_view_endpoint_name().replace('update', 'list')
)
) )
breadcrumbs_menu.add_entry( breadcrumbs_menu.add_entry(
'endpoint', 'endpoint',
'show', 'show',
endpoint = '{}.{}'.format( endpoint = '{}.show'.format(cls.module_name)
cls.module_name,
cls.get_view_endpoint_name().replace('update', 'show')
)
) )
breadcrumbs_menu.add_entry( breadcrumbs_menu.add_entry(
'endpoint', 'endpoint',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment