-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while update Role #208
Comments
The actual role seems to be saved successfully though... Not sure what's going on. I have a suspicion it has something to do with the fact that PermissionViewModel is a record in stead of a regular class... |
Indeed like I thought... Adding an Equals method to public sealed record PermissionViewModel : FSHPermission
{
public bool Enabled { get; set; }
public PermissionViewModel(string Description, string Action, string Resource, bool IsBasic = false, bool IsRoot = false)
: base(Description, Action, Resource, IsBasic, IsRoot)
{
}
public bool Equals(PermissionViewModel? other) => base.Equals(other);
public override int GetHashCode() => base.GetHashCode();
} |
I'll test that and give you a feedback |
Worked fine after adding the Equals method. |
This shouldn't be closed as long as it isn't fixed in the actual repo... You're welcome to create a PR ;-) |
Hello,
I think there is a regression in the front while updating role, before there was no bug, this month I tried to update a role and I have the error bellow
Unhandled exception rendering component: The given key 'PermissionViewModel { Description = View Dashboard, Action = View, Resource = Dashboard, IsBasic = False, IsRoot = False, Name = Permissions.Dashboard.View, Enabled = True }' was not present in the dictionary.
I download the last version in this repo and the error existe too.
To reproduce, juste go to Basic role and check or uncheck any field then save.
The text was updated successfully, but these errors were encountered: