quick fix for #475 - cannot save role
This commit is contained in:
parent
288cad3d3f
commit
7d7e8e9e66
|
@ -24,9 +24,9 @@ namespace Oqtane.Repository
|
|||
return _db.Role.Where(item => item.SiteId == siteId || item.SiteId == null);
|
||||
}
|
||||
|
||||
|
||||
public Role AddRole(Role role)
|
||||
{
|
||||
role.Description = role.Description.Substring(0, 256);
|
||||
_db.Role.Add(role);
|
||||
_db.SaveChanges();
|
||||
return role;
|
||||
|
@ -34,6 +34,7 @@ namespace Oqtane.Repository
|
|||
|
||||
public Role UpdateRole(Role role)
|
||||
{
|
||||
role.Description = role.Description.Substring(0, 256);
|
||||
_db.Entry(role).State = EntityState.Modified;
|
||||
_db.SaveChanges();
|
||||
return role;
|
||||
|
|
Loading…
Reference in New Issue
Block a user