mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
security: fix var shadowing in CreateOrUpdate
This commit is contained in:
@@ -197,7 +197,7 @@ func (s *Store) GetRole(name string) (Role, error) {
|
||||
}
|
||||
|
||||
func (s *Store) CreateOrUpdateRole(role Role) (Role, error) {
|
||||
role, err := s.GetRole(role.Role)
|
||||
_, err := s.GetRole(role.Role)
|
||||
if err == nil {
|
||||
return s.UpdateRole(role)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user