fix #618
This commit is contained in:
		| @ -26,7 +26,7 @@ namespace Oqtane.Repository | ||||
|  | ||||
|         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; | ||||
| @ -34,7 +34,7 @@ namespace Oqtane.Repository | ||||
|  | ||||
|         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; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker