User roles assignment screen broken for SN without facility

Description

Assumptions:
Facility is NOT required in Supervisory Node per

If there's any supervisory node in the system that does not have a facility assigned to it, the user roles assignment screen won't work for any user. Upon clicking "Roles" an Internal Application Error shows up.

Repro

  1. Create supervisory node without facility assigned (creating SNs is only posssible via API currently)

  2. Go to Administration -> Users

  3. Click "Roles" button next to any user

  4. Internal Application Error modal shows up and the browser console shows the error attached below.

Expected

  • I can enter user roles assignment screen even if there's a supervisory node without facility assigned.

  • display SN name without facility - if facility is null

Environment

None

Assignee

Paweł Albecki

Reporter

Sebastian Brudziński

Labels

Story Points

1

Time tracking

8h

Epic Link

Components

Sprint

None

Affects versions

Priority

Major
Configure