Open slezica opened 11 years ago
Looks like you have multiple sendgrid.models.Arguments
(https://github.com/RyanBalfanz/django-sendgrid/blob/develop/sendgrid/models.py#L157) of the same key.
There should probably be a unique=True
on Argument.key
but there is not in the current release. I'd like to better understand how multiple Arguments of that key were created in the first place before adding that constraint in a later release.
FWIW, I've sent well over a million emails and haven't exhibited this behavior, which makes me think it's probably okay to add that constraint. However, in your case the migration should fail unless you manually migrate your data.
@slezica I quickly threw together a tool to help with the data migration (see 904f21488e69aaf2f33b54c85f11ca1224256552)
Wow, swift action! Thanks a lot, Ryan!
Thank @hoddez and myself once it's released ;) We're still doing some testing and such…
Stack trace:
I'll make time to dig up the relevant database rows and, if I find it's not my fault, post minimal code to reproduce the issue.