Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ private static PermissionData GetPermissionData(IEdmRecordExpression permissionR
var schemeProperty = permissionRecord.FindProperty("SchemeName")?.Value as IEdmStringConstantExpression;
var scopesProperty = permissionRecord.FindProperty("Scopes")?.Value as IEdmCollectionExpression;

var scopes = scopesProperty.Elements.Select(s => GetScopeData(s as IEdmRecordExpression));
var scopes = scopesProperty?.Elements.Select(s => GetScopeData(s as IEdmRecordExpression)) ?? Enumerable.Empty<PermissionScopeData>();

return new PermissionData() { SchemeName = schemeProperty.Value, Scopes = scopes.ToList() };
return new PermissionData() { SchemeName = schemeProperty?.Value, Scopes = scopes.ToList() };
}

private static PermissionScopeData GetScopeData(IEdmRecordExpression scopeRecord)
Expand Down