Skip to content

Conversation

@mjhanke
Copy link

@mjhanke mjhanke commented Sep 7, 2018

In KeyValueStore.save() you .upper() the key field. This doesn't happen when set_key_value calls KeyValueStore.objects.get_or_create(key=key, defaults={'value': value}). The standard models.Manager.get_or_create will check for the non-.upper() field, return that it doesn't have that saved, and then call the KeyValueStore.save() method, which will then fail.

Steps to repro:
call set_key_value('cheese', 'cheesier') two times in a row.

Micaiah Hanke added 3 commits September 7, 2018 14:48
`get_or_create` IntegrityError bug fix

See merge request mst/django-keyvaluestore!1
@mjhanke mjhanke requested a review from nielsvanoch as a code owner September 7, 2018 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant