TypeError at / 'AnonymousUser' object is not iterable

I’m not sure I’m understanding what you’re asking here.

The problem is that AnonymousUser is not a User, nor is it an instance of Account.

It cannot be used as a replacement for a User (or Account) under any circumstance as an object reference defined as a foreign key to those objects.

1 Like