mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Catch error when decoding permissions
This commit is contained in:
parent
8f02092731
commit
3e2b4454dd
1 changed files with 7 additions and 3 deletions
10
lib/api.dart
10
lib/api.dart
|
|
@ -434,9 +434,13 @@ class InvenTreeAPI {
|
|||
return true;
|
||||
}
|
||||
|
||||
List<String> perms = List.from(roles[role]);
|
||||
|
||||
return perms.contains(permission);
|
||||
try {
|
||||
List<String> perms = List.from(roles[role]);
|
||||
return perms.contains(permission);
|
||||
} catch (error, stackTrace) {
|
||||
sentryReportError(error, stackTrace);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue