Skip to content

Commit

Permalink
avoid spurious inline validation errors
Browse files Browse the repository at this point in the history
svn path=/plone.formwidget.namedfile/trunk/; revision=40466
  • Loading branch information
davisagli committed Oct 1, 2010
1 parent 1e08657 commit d623cd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Changelog
=========

1.0b8 (unreleased)
1.0b8 (2010-10-01)
------------------

* Avoid showing validation errors during KSS validation, as the file is not
uploaded in this case.
[davisagli]

* Don't use the action from the request when the form submission succeeded.
(In that case we always want "keep existing image")
[davisagli]
Expand Down
3 changes: 3 additions & 0 deletions plone/formwidget/namedfile/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ def action(self):

def extract(self, default=NOVALUE):
action = self.request.get("%s.action" % self.name, None)
if self.request.get('PATH_INFO', '').endswith('kss_z3cform_inline_validation'):
action = 'nochange'

if action == 'remove':
return None
elif action == 'nochange':
Expand Down

0 comments on commit d623cd9

Please sign in to comment.