Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #19944 - locked seed error fixed #353

Merged
merged 1 commit into from Jun 13, 2017

Conversation

lzap
Copy link
Member

@lzap lzap commented Jun 8, 2017

Found one issue with the latest patch - initial seed works fine, but if you seed for the 2nd time, it errors out with

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: This role is locked from being modified by users.
/home/lzap/work/foreman_discovery/db/seeds.d/90_add_permissions_from_default_roles.rb:9:in `block in <top (required)>'
/home/lzap/work/foreman_discovery/db/seeds.d/90_add_permissions_from_default_roles.rb:3:in `each'
/home/lzap/work/foreman_discovery/db/seeds.d/90_add_permissions_from_default_roles.rb:3:in `<top (required)>'
...

This is because it's actually locked and can't be modified anymore. There is a helper block in the Role class.

@dlobato @ehelms

@lzap
Copy link
Member Author

lzap commented Jun 8, 2017

@dLobatog anything blocks us? I'd like to do 9.1 release today.

@dLobatog dLobatog merged commit 1d98dbc into theforeman:develop Jun 13, 2017
@dLobatog
Copy link
Member

Thanks @lzap !

@lzap lzap deleted the locking-19944 branch June 13, 2017 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants