Bug #11220
closedPGError: ERROR: column reference "name" is ambiguous LINE 11
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1246839
Description of problem:
On Creating a host using this link https://satellite6-ops.rhev-ci-vms.eng.rdu2.redhat.com/hosts/new
I get a nice PG error
Version-Release number of selected component (if applicable):
6.1 (beta)
How reproducible:
100%
Steps to Reproduce:
1. go to Hosts menu. click New Host
2. PG Error
3.
Actual results:
PGError: ERROR: column reference "name" is ambiguous LINE 11: WHERE "taxonomies"."id" = '5' )))) ORDER BY name ^ : SELECT "compute_resources"."id" AS t0_r0, "compute_resources"."name" AS t0_r1, "compute_resources"."description" AS t0_r2, "compute_resources"."url" AS t0_r3, "compute_resources"."user" AS t0_r4, "compute_resources"."password" AS t0_r5, "compute_resources"."uuid" AS t0_r6, "compute_resources"."type" AS t0_r7, "compute_resources"."created_at" AS t0_r8, "compute_resources"."updated_at" AS t0_r9, "compute_resources"."attrs" AS t0_r10, "compute_resources"."email" AS t0_r11, "taxonomies"."id" AS t1_r0, "taxonomies"."name" AS t1_r1, "taxonomies"."type" AS t1_r2, "taxonomies"."created_at" AS t1_r3, "taxonomies"."updated_at" AS t1_r4, "taxonomies"."ignore_types" AS t1_r5, "taxonomies"."description" AS t1_r6, "taxonomies"."label" AS t1_r7, "taxonomies"."default_info" AS t1_r8, "taxonomies"."apply_info_task_id" AS t1_r9, "taxonomies"."ancestry" AS t1_r10, "taxonomies"."title" AS t1_r11, "taxonomies"."katello_default" AS t1_r12, "locations_compute_resources"."id" AS t2_r0, "locations_compute_resources"."name" AS t2_r1, "locations_compute_resources"."type" AS t2_r2, "locations_compute_resources"."created_at" AS t2_r3, "locations_compute_resources"."updated_at" AS t2_r4, "locations_compute_resources"."ignore_types" AS t2_r5, "locations_compute_resources"."description" AS t2_r6, "locations_compute_resources"."label" AS t2_r7, "locations_compute_resources"."default_info" AS t2_r8, "locations_compute_resources"."apply_info_task_id" AS t2_r9, "locations_compute_resources"."ancestry" AS t2_r10, "locations_compute_resources"."title" AS t2_r11, "locations_compute_resources"."katello_default" AS t2_r12 FROM "compute_resources" LEFT OUTER JOIN "taxable_taxonomies" ON "taxable_taxonomies"."taxable_id" = "compute_resources"."id" AND "taxable_taxonomies"."taxable_type" = 'ComputeResource' LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = "taxable_taxonomies"."taxonomy_id" AND taxonomies.type='Organization' LEFT OUTER JOIN "taxable_taxonomies" "taxable_taxonomies_compute_resources_join" ON "taxable_taxonomies_compute_resources_join"."taxable_id" = "compute_resources"."id" AND "taxable_taxonomies_compute_resources_join"."taxable_type" = 'ComputeResource' LEFT OUTER JOIN "taxonomies" "locations_compute_resources" ON "locations_compute_resources"."id" = "taxable_taxonomies_compute_resources_join"."taxonomy_id" AND taxonomies.type='Location' WHERE "compute_resources"."id" IN (NULL) AND (1=1) AND ((("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM "compute_resources" INNER JOIN "taxable_taxonomies" ON "compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON "taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND taxonomies.type='Organization' WHERE "taxonomies"."id" = '14' )) AND ("compute_resources"."id" IN (SELECT "compute_resources"."id" FROM "compute_resources" INNER JOIN "taxable_taxonomies" ON "compute_resources"."id" = "taxable_taxonomies"."taxable_id" AND taxable_type = 'ComputeResource' INNER JOIN "taxonomies" ON "taxable_taxonomies"."taxonomy_id" = "taxonomies"."id" AND taxonomies.type='Location' WHERE "taxonomies"."id" = '5' )))) ORDER BY name
Updated by Dominic Cleal over 9 years ago
- Category set to Rails
This looks much like https://github.com/theforeman/foreman/pull/2496.
Updated by Dominic Cleal over 9 years ago
- Status changed from New to Ready For Testing
- Assignee changed from Tomer Brisker to Avi Tal
- Pull request https://github.com/theforeman/foreman/pull/2496 added
- Pull request deleted (
)
Updated by Tomer Brisker over 9 years ago
To reproduce:
Create user that has view_compute_resources permission with a location or organization filter.
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release set to 72
Updated by avi tal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 4ca9215584bf2b81a3291b728d0c436a9a773f41.