Skip to content

Commit

Permalink
fix for first upload in new namespace fails #186
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Dec 1, 2023
1 parent 1bca753 commit 0e007b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def upload_helper(request, namespace, configuration=None, mode=None):
@login_required
def upload(request):
if request.method == 'POST':
namespace = request.POST['namespace'].replace('..','.').replace(' ','').replace('&','')
namespace = request.POST.get('namespace',getusername(request)).replace('..','.').replace(' ','').replace('&','')
if flat.users.models.haswritepermission(getusername(request), namespace, request) and 'file' in request.FILES:
return upload_helper(request, namespace)
else:
Expand Down

0 comments on commit 0e007b9

Please sign in to comment.