NOT NULL IntegrityError at /sso/callback/

Hi Everyone,

I wondered if I could get some help with django-esi? I have used python and Django before but I am not the world’s best web app developer - I’m using this as a project to improve my skills, and hopefully one day reduce the amount of copy and pasting between spreadsheets!

I’m following the instructions at the github readme page (here) for 'Usage in views' and I get the following error.

IntegrityError at /sso/callback/ 
NOT NULL constraint failed: esi_token.refresh_token

I understand this to mean that the esi_token.refresh_token is Null, but this is not what Django expected because the Model doesn't declare Null = True. Is that correct?

Looking into the Django admin interface, the callback entry for this attempt (the only entry) has no token associated with it.

I’d be really grateful for any help!