X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0e87ae0739ed3e72301b7b718098f97a7f06a5d8..b3b6cbc7a545af2f3fa6f04f9281fd994b2adea7:/apps/piston/managers.py?ds=inline diff --git a/apps/piston/managers.py b/apps/piston/managers.py index 5694d0e28..a1c9d496b 100644 --- a/apps/piston/managers.py +++ b/apps/piston/managers.py @@ -48,15 +48,15 @@ class ResourceManager(models.Manager): if not self._default_resource: self._default_resource = self.get(name=name) - return self._default_resource + return self._default_resource class TokenManager(KeyManager): def create_token(self, consumer, token_type, timestamp, user=None): """ Shortcut to create a token with random key/secret. """ - token, created = self.get_or_create(consumer=consumer, - token_type=token_type, + token, created = self.get_or_create(consumer=consumer, + token_type=token_type, timestamp=timestamp, user=user) @@ -65,4 +65,4 @@ class TokenManager(KeyManager): token.save() return token - +