error when resource does not have id ActiveRecord::RecordInvalid: Validation failed: Resource can't be blank
|Assigned To:||Ivan Necas|
|Target version:||Foreman - Team Ivan Iteration 16|
|Found in release:||Pull request:||https://github.com/theforeman/foreman-tasks/pull/256|
|Velocity based estimate||-|
When a resource is going to be locked, the lock requires that the resource has an id (see validation in lock.rb). Without this there are errors.
To reproduce, register a content host with subscription-manager and update facts:
subscription-manager register --username admin --password changeme --org Default_Organization --env Library
subscription-manager facts --update
The CpConsumerUser does not have an id since it is a temporary user used just for the length of the call.