You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class MyModel(psqlextra.Model):
title = models.CharField(max_length=14)
MyMode.objects.on_conflict(['pk'], ConflictAction.UPDATE).insert(pk=0, title='great')
Raises the following exception:
django.core.exceptions.SuspiciousOperation: pk is not a valid conflict target, specify a list of column names, or tuples with column names and hstore key.
In Django, pk is a special keyword that always refers to the primary key of a model. psqlextra/compiler.py should also look at model._meta.pk when validating conflict targets.