security: fix var shadowing in CreateOrUpdate

This commit is contained in:
Yicheng Qin
2015-03-16 14:54:44 -07:00
parent b65a7ed18b
commit d7780cf293

View File

@@ -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)
}