Fix V2 catalog and tag pagination

This commit is contained in:
Joseph Schorr 2016-02-10 00:25:33 +02:00
parent 7ac3b05a1d
commit db0eab0461
7 changed files with 105 additions and 38 deletions

View file

@ -11,7 +11,7 @@ def decrypt_string(string, key, ttl=None):
""" Decrypts an encrypted string with the specified key. The key must be 32 raw bytes. """
f = Fernet(base64.urlsafe_b64encode(key))
try:
return f.decrypt(string, ttl=ttl)
return f.decrypt(str(string), ttl=ttl)
except InvalidToken:
return None
except TypeError: