Project

General

Profile

Actions

Bug #21168

closed

Can't create a location

Added by Ori Rabin over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Fixed in Releases:
Found in Releases:

Description

Trying to create a location silently fails, the server log only shows: "Failed to save: "
In the taxonomy controller using save! instead of save gives: ActiveRecord::RecordInvalid: Validation failed: Taxonomy has already been taken.

The sql logs show this insert right before rollback:

2017-10-02T16:41:58 471cb7ee [sql] [D]   SQL (0.6ms)  INSERT INTO "taxable_taxonomies" ("taxonomy_id", "taxable_id", "taxable_type", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"  [["taxonomy_id", 23], ["taxable_id", 104], ["taxable_type", "JobTemplate"], ["created_at", "2017-10-02 13:41:58.701252"], ["updated_at", "2017-10-02 13:41:58.701252"]]
2017-10-02T16:41:58 471cb7ee [sql] [D]   TaxableTaxonomy Exists (0.9ms)  SELECT  1 AS one FROM "taxable_taxonomies" WHERE "taxable_taxonomies"."taxonomy_id" = $1 AND "taxable_taxonomies"."taxable_id" = $2 AND "taxable_taxonomies"."taxable_type" = $3 LIMIT $4  [["taxonomy_id", 23], ["taxable_id", 100], ["taxable_type", "JobTemplate"], ["LIMIT", 1]]
2017-10-02T16:41:59 471cb7ee [sql] [D]    (0.4ms)  ROLLBACK

After deleting all of the job templates (including the seeded ones) the location can be saved.


Related issues 3 (0 open3 closed)

Related to Foreman Remote Execution - Bug #20427: REX doesnt start with rails 5ClosedAdam Ruzicka07/27/2017Actions
Related to Foreman Remote Execution - Bug #11805: error creating organization in assign_default_templatesClosed09/14/2015Actions
Blocked by Foreman - Bug #11825: Adding template types from plugins doesn't work with taxonomiesClosedIvan Necas09/15/2015Actions
Actions

Also available in: Atom PDF