Description of problem: When accessing the "policy_events" attribute of the "vms" resource the request fails with bad request error: { "error": { "kind": "internal_server_error", "message": "undefined local variable or method `id' for #<ActiveRecord::Relation []>\nDid you mean? ids", "klass": "NameError" } } Version-Release number of selected component (if applicable): 5.9.0.21, 5.8.3.2 How reproducible: 100% Steps to Reproduce: GET /api/vms/:id?attributes=policy_events
https://github.com/ManageIQ/manageiq/pull/17036
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/adc676cb3bf11cd314aff3be55715adfc6a4eba8 commit adc676cb3bf11cd314aff3be55715adfc6a4eba8 Author: Jillian Tullo <jtullo> AuthorDate: Thu Feb 22 07:29:16 2018 -0500 Commit: Jillian Tullo <jtullo> CommitDate: Thu Feb 22 07:29:16 2018 -0500 Fix policy_events relationship on VmOrTemplate The policy_events relationship currently results in an internal server error because it is referencing "id" which is not valid Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1546995 app/models/vm_or_template.rb | 2 +- spec/models/vm_or_template_spec.rb | 8 + 2 files changed, 9 insertions(+), 1 deletion(-)
Closing this as its already been verified in two z-streams and has test coverage around it.