Project

General

Profile

Bug #1609

REST API calls /hosts/:id/puppetclasses fails for hosts with same class assigned directly and through host group

Added by Florent Castelli about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Trace:

Puppetclass Load (1.2ms) SELECT "puppetclasses"."id" AS t0_r0, "puppetclasses"."name" AS t0_r1, "puppetclasses"."created_at" AS t0_r2, "puppetclasses"."updated_at" AS t0_r3, "hostgroups"."id" AS t1_r0, "hostgroups"."name" AS t1_r1, "hostgroups"."created_at" AS t1_r2, "hostgroups"."updated_at" AS t1_r3, "hostgroups"."environment_id" AS t1_r4, "hostgroups"."operatingsystem_id" AS t1_r5, "hostgroups"."architecture_id" AS t1_r6, "hostgroups"."medium_id" AS t1_r7, "hostgroups"."ptable_id" AS t1_r8, "hostgroups"."root_pass" AS t1_r9, "hostgroups"."puppet_ca_proxy_id" AS t1_r10, "hostgroups"."use_image" AS t1_r11, "hostgroups"."image_file" AS t1_r12, "hostgroups"."ancestry" AS t1_r13, "hostgroups"."vm_defaults" AS t1_r14, "hostgroups"."subnet_id" AS t1_r15, "hostgroups"."domain_id" AS t1_r16, "hostgroups"."puppet_proxy_id" AS t1_r17 FROM "puppetclasses" LEFT OUTER JOIN "hostgroups_puppetclasses" ON "hostgroups_puppetclasses"."puppetclass_id" = "puppetclasses"."id" LEFT OUTER JOIN "hostgroups" ON "hostgroups"."id" = "hostgroups_puppetclasses"."hostgroup_id" WHERE ((puppetclasses.id IN OR hostgroups.id IN))
LookupKey Load (0.5ms) SELECT "lookup_keys".* FROM "lookup_keys" WHERE ("lookup_keys".puppetclass_id = 99) ORDER BY LOWER
Completed 500 Internal Server Error in 37ms

TypeError (can't convert nil into Hash):
app/models/lookup_key.rb:53:in `merge'
app/models/lookup_key.rb:53:in `as_json'
app/models/hostgroup.rb:141:in `map'
app/models/hostgroup.rb:141:in `map'
app/models/hostgroup.rb:141:in `map'
app/controllers/puppetclasses_controller.rb:22:in `index'
app/controllers/puppetclasses_controller.rb:17:in `index'


Related issues

Is duplicate of Foreman - Bug #1608: REST API calls /hosts/:id/puppetclasses fails for hosts with no class and no hostgroupDuplicate2012-05-09

Associated revisions

Revision 134f45c0 (diff)
Added by Ohad Levy about 7 years ago

fixes #1609 - REST API calls /hosts/:id/puppetclasses fails for hosts with same class assigned directly and through host group

History

#1 Updated by Ohad Levy about 7 years ago

  • Category set to API
  • Assignee set to Ohad Levy
  • Target version set to 1.0

#2 Updated by Ohad Levy about 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF