6👍
From the error it should be something like that:
similar_actions = Action.objects.filter(created__gte=last_minute, user_id=user.id, verb=verb)
You’re querying for the timestamp
attribute of the Action
model which does not exist. The available choices are:
created, id, target, target_ct, target_ct_id, target_id, user, user_id, verb
So, you should query the database based on those (or any relation of those) that are attributes of your Action
model.
3👍
I had the same error when one of columns in my second database was removed.
You can try to reset migrations:
- Remove the all migrations files within your project.
Go through each of your projects apps migration folder (your_app/migrations/) and remove everything inside, except the init.py file. - Run
makemigrations
andmigrate
.
Not sure about your case, but this solved the same error in my situation.
Source:stackexchange.com