I'm not understanding this. I have seen the posts here Django - Slugs - Key (slug)=() is duplicated and here Django: Key (slug)=(*) already exists.
Here is my error message:
django.db.utils.IntegrityError: duplicate key value violates unique constraint "caseAT_case_slug_key" DETAIL: Key (slug)=() already exists.
In the docs it says: https://docs.djangoproject.com/en/1.8/howto/writing-migrations/#migrations-that-add-unique-fields Applying a “plain” migration that adds a unique non-nullable field to a table with existing rows will raise an error because the value used to populate existing rows is generated only once, thus breaking the unique constraint.
But this is NOT a migration. This is a djangoitem pipeline. The model has the slug being created automatically from the title. Therefore, I did not put slug in the pipeline. If it is expecting to create slug, and balks because it is already there, why isn't it also expecting to create all the other keys? If it isn't in the pipeline, why is it trying to create it now? Because it expects to create it? So I should remove the auto create on that field? Then how is it going to get created? I did want my slugs to be unique.
It seems circular and crazy to me, but what difference does that make? None. Your assistance appreciated.