diff options
author | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2011-06-06 17:35:36 +0000 |
---|---|---|
committer | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2011-06-06 17:35:36 +0000 |
commit | 27d67396f5d7eb1411054b2153c44fc4aec75178 (patch) | |
tree | bcb65bd24ecdda3aef67188e022580c89d275ba2 | |
parent | f0bbb3d3ba1a4189ad1cd8f95df4da718f003384 (diff) |
frontend.afe.model_logic: Rename validate_unique
So we call the actual intended validation method rather
than the django one, that could return None, and then
raise a non intended exception during the validation
process.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@5406 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r-- | frontend/afe/model_logic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/afe/model_logic.py b/frontend/afe/model_logic.py index 38bcabef..9f13e67e 100644 --- a/frontend/afe/model_logic.py +++ b/frontend/afe/model_logic.py @@ -694,7 +694,7 @@ class ModelExtensions(object): return data - def validate_unique(self): + def _validate_unique(self): """\ Validate that unique fields are unique. Django manipulators do this too, but they're a huge pain to use manually. Trust me. @@ -755,7 +755,7 @@ class ModelExtensions(object): def do_validate(self): errors = self._validate() - unique_errors = self.validate_unique() + unique_errors = self._validate_unique() for field_name, error in unique_errors.iteritems(): errors.setdefault(field_name, error) if errors: |