mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
networks: Handle unknown connections gracefully
When trying to edit connection of unknown type show an error and return to connections list instead of trying to filling in some fields and doing badly.
This commit is contained in:
parent
2c23b0ecb4
commit
f93de11c6a
@ -65,6 +65,11 @@ def edit(request, uuid):
|
||||
'Connection not found.'))
|
||||
return redirect(reverse_lazy('networks:index'))
|
||||
|
||||
if connection.get_connection_type() not in network.CONNECTION_TYPE_NAMES:
|
||||
messages.error(request,
|
||||
_('This type of connection is not yet understood.'))
|
||||
return redirect(reverse_lazy('networks:index'))
|
||||
|
||||
form = None
|
||||
form_data = {'name': connection.get_id()}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user