Skip to content

Commit

Permalink
Do not make portadmin readonly if poe error
Browse files Browse the repository at this point in the history
stop poe error from making portadmin unusable, instead disable
poe and log error
  • Loading branch information
stveit committed Nov 30, 2023
1 parent 064b661 commit 2e0c8e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/nav/web/portadmin/views.py
Expand Up @@ -252,8 +252,10 @@ def populate_infodict(request, netbox, interfaces):
XMLParseError,
POEStateNotSupportedError,
) as error:
readonly = True
messages.error(request, str(error))
supports_poe = False
_logger.error(

Check warning on line 256 in python/nav/web/portadmin/views.py

View check run for this annotation

Codecov / codecov/patch

python/nav/web/portadmin/views.py#L255-L256

Added lines #L255 - L256 were not covered by tests
'Error getting PoE information from netbox %s: %s', str(netbox), str(error)
)

if handler and not handler.is_configurable():
add_readonly_reason(request, handler)
Expand Down

0 comments on commit 2e0c8e9

Please sign in to comment.