stencila/hub

TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'

sentry-io opened this issue ยท 1 comments

Not all tokens have an expiry time...

Sentry Issue: HUB-178

TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'
(3 additional frame(s) were not displayed)
...
  File "rest_framework/serializers.py", line 205, in save
    self.instance = self.create(validated_data)
  File "projects/api/serializers.py", line 747, in create
    job = source.pull(user=request.user)
  File "projects/models/sources.py", line 368, in pull
    secrets=self.get_secrets(user),
  File "projects/models/sources.py", line 770, in get_secrets
    token, app = get_user_google_token(self.creator)
  File "users/socialaccount/tokens.py", line 82, in get_user_google_token
    if token.expires_at > timezone.now() - timezone.timedelta(seconds=90):

๐ŸŽ‰ This issue has been resolved in version 4.41.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€