fix error when creating access tokens

This commit is contained in:
Laura Klünder 2016-12-24 16:27:25 +01:00
parent 62d4132d60
commit c92b70eea4
2 changed files with 2 additions and 8 deletions

View file

@ -135,13 +135,7 @@ def user_detail(request, pk):
token.user = user
token.secret = AccessToken.create_secret()
author = None
try:
author = request.user.operator
except:
pass
token.author = author
token.author = request.user
token.save()
return redirect('access.user.token', user=user.id, token=token.id)

View file

@ -50,7 +50,7 @@ else:
debug_fallback = "runserver" in sys.argv
DEBUG = config.getboolean('django', 'debug', fallback=debug_fallback)
DIRECT_EDITING = config.getboolean('c3nav', 'direct_editing', fallback=DEBUG)
DIRECT_EDITING = False # config.getboolean('c3nav', 'direct_editing', fallback=DEBUG)
PUBLIC_PACKAGES = [n for n in config.get('c3nav', 'public_packages', fallback='').split(',') if n]
EDITOR_HOSTERS = OrderedDict((name[7:], data) for name, data in config.items() if name.startswith('hoster:'))