[damned-lies] Do not add missing file errors when clean_file has already generated errors



commit 84f42cff100a1ef7a5ef18952a74c06b7c4d40d7
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Mar 11 19:58:00 2010 +0100

    Do not add missing file errors when clean_file has already generated errors
    
    Fixes bug #612610

 vertimus/forms.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vertimus/forms.py b/vertimus/forms.py
index 148aad6..cb801d3 100644
--- a/vertimus/forms.py
+++ b/vertimus/forms.py
@@ -76,10 +76,10 @@ class ActionForm(forms.Form):
         if action.comment_is_required and not comment:
             raise forms.ValidationError(_("A comment is needed for this action."))
 
-        if action.arg_is_required and not comment and not file:
+        if self.is_valid() and action.arg_is_required and not comment and not file:
             raise forms.ValidationError(_("A comment or a file is needed for this action."))
 
-        if action.file_is_required and not file:
+        if self.is_valid() and action.file_is_required and not file:
             raise forms.ValidationError(_("A file is needed for this action."))
 
         if action.file_is_prohibited and file:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]