From 8e44431e5b34c2e647c339f332cea32d44797951 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 9 Apr 2017 11:45:38 +0200 Subject: Fixed renaming files. --- fbin/fbin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fbin') diff --git a/fbin/fbin.py b/fbin/fbin.py index 42c371f..708243e 100755 --- a/fbin/fbin.py +++ b/fbin/fbin.py @@ -276,7 +276,8 @@ def files(): @app.route('/files', methods = ['POST']) @login_required def file_edit(): - f = get_file(request.form.get('hash'), user_id = current_user.get_id(), update_accessed = False) + user_id = int(current_user.get_id().split(':')[0]) + f = get_file(request.form.get('hash'), user_id = user_id, update_accessed = False) if not f: flash('File not found.', 'error') return redirect(url_for('.files')) -- cgit v1.2.3