Shepherd
Shepherd copied to clipboard
Unable to import domains UNIQUE constraint failed: catalog_domain.registrar
When importing domains using the import csv feature, the following error appears when domains have the same registrar as a pre-existing domains
Issue processing data for 'example.com': IntegrityError('UNIQUE constraint failed: catalog_domain.registrar')
Thanks for bringing this to my attention. That's a simple thing to correct. The field is just inappropriately marked as Unique.
I am also experiencing this issue, though i have modified models.py and removed the unique field, and also tried setting it to False. I currently have one domain that I manually added through the webservice, which has the same registrar information as the data I am attempting to import via CSV.
-- Error Issue processing data for 'mydomain.com': IntegrityError('UNIQUE constraint failed: catalog_domain.registrar')
--Relevant line from models.py
registrar = models.CharField('Registrar', max_length=100, help_text='Enter the name of the registrar where this domain is registered', null=True)
Please let me know if I can provide any additional information. Thanks.
Turns out the issue is also present in catalog/migrations/0001_initial.py and that is making its way into the database.