Re: Django generated migration fails with KeyError for field that was removed from the model.

2018-04-19 Thread Jani Tiainen
Hi, Is that complete model definition? Since exception seems to go through modifying composed index (unique_together) where you might still have reference to deleted field. On Thu, Apr 19, 2018 at 3:36 PM, James Farris wrote: > My guess is that field is not empty in the database or it’s being

Re: Django generated migration fails with KeyError for field that was removed from the model.

2018-04-19 Thread James Farris
My guess is that field is not empty in the database or it’s being called in a view or template still. Sent from my mobile device > On Apr 18, 2018, at 2:59 PM, jackotonye wrote: > > A migration generated with `python manage.py makemigrations` Fails to execute > using `python manage.py migrat

Django generated migration fails with KeyError for field that was removed from the model.

2018-04-18 Thread jackotonye
A migration generated with `python manage.py makemigrations` Fails to execute using `python manage.py migrate`. Model Layout: class Offer(BaseModel): client = models.ForeignKey(Client, on_delete=models.PROTECT, related_name='offers') amount_off = models.DecimalField(max_digits=5, decim