Bug #18771

error when resource does not have id ActiveRecord::RecordInvalid: Validation failed: Resource can't be blank

Added by Thomas McKay about 1 month ago. Updated about 1 month ago.

Assigned To:-
Target version:Foreman - Team Ivan backlog
Difficulty: Bugzilla link:1428371
Found in release: Pull request:
Story points-
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.


#1 Updated by Thomas McKay about 1 month ago

  • Bugzilla link set to 1428371

#2 Updated by Adam Ruzicka about 1 month ago

  • Target version set to Team Ivan backlog

Also available in: Atom PDF