fix NullRef when bts user has null TradingPermissionUnit
This commit is contained in:
1 parent
8b7f31ccd6
commit
afcf40a900
1 file changed
+1
-1
@@ -19,7 +19,7 @@ namespace bts.api.core
|
||||
_user_name = user_name ?? string.Empty;
|
||||
_allowed_accounts = search_admin(u => u.Name == _user_name).Where(x =>
|
||||
{
|
||||
return x.Item2.HasPermissions || x.Item3.HasPermissions;
|
||||
return (x.Item2 != null && x.Item2.HasPermissions) || (x.Item3 != null && x.Item3.HasPermissions);
|
||||
}).Select(xx => xx.Item1).ToList();
|
||||
foreach (var val in _allowed_accounts)
|
||||
_allowed_account_dict[val.Name] = val.Name;
|
||||
|
||||
Reference in new issue
Block a user