changeset 4647:ca61dedd6fda

AttachFile: fix exception when someone just clicks on upload, without giving a file
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 14 Mar 2009 16:11:39 +0100
parents bb7f7f7ef88a
children 321ca881ce70 922550c3dd25
files MoinMoin/action/AttachFile.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sat Mar 14 14:35:46 2009 +0100
+++ b/MoinMoin/action/AttachFile.py	Sat Mar 14 16:11:39 2009 +0100
@@ -567,7 +567,7 @@
     if overwrite and not request.user.may.delete(pagename):
         return _('You are not allowed to overwrite a file attachment of this page.')
 
-    filename = form.get('file__filename__')
+    filename = form.get('file__filename__', u'')
     rename = form.get('rename', [u''])[0].strip()
     if rename:
         target = rename