Skip to content

Commit

Permalink
Merge pull request #619 from sbwalker/master
Browse files Browse the repository at this point in the history
fix #618
  • Loading branch information
sbwalker authored Jun 15, 2020
2 parents db6d5d2 + 71b3b69 commit 06480d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Oqtane.Server/Repository/RoleRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public IEnumerable<Role> GetRoles(int siteId, bool includeGlobalRoles)

public Role AddRole(Role role)
{
role.Description = role.Description.Substring(0, 256);
role.Description = role.Description.Substring(0, (role.Description.Length > 256) ? 256 : role.Description.Length);
_db.Role.Add(role);
_db.SaveChanges();
return role;
}

public Role UpdateRole(Role role)
{
role.Description = role.Description.Substring(0, 256);
role.Description = role.Description.Substring(0, (role.Description.Length > 256) ? 256 : role.Description.Length);
_db.Entry(role).State = EntityState.Modified;
_db.SaveChanges();
return role;
Expand Down

0 comments on commit 06480d9

Please sign in to comment.