Actions
Bug #21168
closedCan't create a location
Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
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.
Actions