django-rest-framework-bulk
django-rest-framework-bulk copied to clipboard
Field Unique fails when trying to bulk update
Model
class Email(models.Model):
email = models.EmailField("Email", unique=True)
Trying to upgrade to a model with a field with the value of unique = true; generates the following error:
/lib/python3.6/site-packages/rest_framework/validators.py", line 71, in exclude_current_instance
return queryset.exclude(pk=self.instance.pk)
Exception Type: AttributeError at /contracts/api/requestboxup/
Exception Value: 'QuerySet' object has no attribute 'pk'
Note: removing the unique = true property; it works perfectly