From 70fa52bae27eb2aaf1182af58071e557f6ce52c3 Mon Sep 17 00:00:00 2001 From: Wondiamgegn Tesfaye Date: Fri, 31 Mar 2017 19:47:15 +0300 Subject: [PATCH] Fixed spatial entity form error when saving with empty required fields --- CHANGELOG.md | 6 ++++++ ui/forms/spatial_unit_form.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0531ae308..0c56d6853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log All notable changes of the Social Tenure Domain Model(STDM) is documented in this file. + + +## [1.5.2] - 2017-03-31 +### Fixed +- **Spatial Entity Forms**: Fixed error when submitting unfilled required fields. + ## [1.5.1] - 2017-03-15 ### Fixed - **Database and Configuration**: Fixed inability to append profile prefix on entity diff --git a/ui/forms/spatial_unit_form.py b/ui/forms/spatial_unit_form.py index e0d01f42a..3c4929242 100644 --- a/ui/forms/spatial_unit_form.py +++ b/ui/forms/spatial_unit_form.py @@ -529,7 +529,8 @@ def on_form_saved(self, model): """ if not model is None: self.feature_models[self.current_feature] = model - self.editor.accept() + if self.editor.is_valid: + self.editor.accept() def on_feature_deleted(self, feature_id): """