79224558

Date: 2024-11-25 20:50:58
Score: 0.5
Natty:
Report link

In my case I was using a check in view.py to check if a there are any objects in a model. I wanted to delete unnecessary migrations and start from zero. But every time I ran makemigrations I get django.db.utils.OperationalError: no such table error. After removing the if models.Product.objects.exists() check from my view.py then I could run the makemigrations command.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: mustafa candan