Skip to content

Deleting a template and (re-)creating one with the same name fails #2152

Closed
@mafredri

Description

@mafredri

Steps to reproduce:

  1. coder templates create docker -d ~/src/coder/examples/templates/docker
  2. coder templates delete docker
  3. Repeat 1.

Step 3 fails with the following error:

> Confirm create? (yes/no) 
POST http://127.0.0.1:4000/api/v2/organizations/90193c29-7f21-4cce-9213-796b088ae170/templates: unexpected status code 500: Internal error inserting template.
        Error: execute transaction: insert template: pq: duplicate key value violates unique constraint "templates_organization_id_name_key"    

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions