"user.user_permissions.remove" expects a permission object. Or the pk of
that object. Hence, the TypeError.
On Mon, Dec 3, 2018 at 9:02 PM Gaurav Tomer
wrote:
> I was trying to remove permission of a user using remove utility as below -
>
> user = User.objects.get(id=user_id)
> user.user_permiss
I was trying to remove permission of a user using remove utility as below -
user = User.objects.get(id=user_id)
user.user_permissions.remove("delete_polls")
Then it raises TypeError:invalid literal for int with base 10:
'delete_polls'
Do I need to pass index here?
As it sounds kind of static w
2 matches
Mail list logo