mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Catch error when decoding permissions
This commit is contained in:
parent
8f02092731
commit
3e2b4454dd
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…
x
Reference in New Issue
Block a user