Open pall-valmundsson opened 8 years ago
Please merge this :+1:
:+1:
:+1: (same as my pull request #79 - I did not notice this one).
I have run into the same error when retrieving identity from RethinkDB, which return in dict.
I would create my own PR if I did not find this PR.
by the way, how about make it this way
identity = getattr(identity, 'id', None) or identity.get('id', None)
feel more robust
Wish it being merged soon.
Hello,
I just ran into the same issue, please merge :)
Regards, Adam.
@mattupstate this is a fairly urgent and easy bug to fix
@mattupstate this issue still not fixed, please merge
I don't intend to maintain the fork but in the meantime, I merged several nice PRs and fixes into https://github.com/webstack/flask-jwt/commits/fork
When using a dict object to represent an identity the default jwt_encode_callback handler fails as getattr does not work with dict objects. This change sets the default value of getattr to None so the dict get part of the statement is evaluated.
The tests required a different implementation of the app fixture.