Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Duplicate key error on switching services #222

Open
ph448 opened this issue Apr 17, 2019 · 0 comments
Open

Duplicate key error on switching services #222

ph448 opened this issue Apr 17, 2019 · 0 comments
Labels

Comments

@ph448
Copy link
Contributor

ph448 commented Apr 17, 2019

This seems to only happen to services switching multiple times, we get:

IntegrityError at /switch_services/352/
duplicate key value violates unique constraint "apimws_ansibleconfiguration_service_id_57c01285a0290788_uniq"
DETAIL:  Key (service_id, key)=(703, backup_first_date) already exists.

This means that

AnsibleConfiguration.objects.update_or_create(service=test_service, key="backup_first_date",
value=date.today().isoformat())
fails.

@ph448 ph448 added the bug label Apr 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant