From b9de0d10885519b2a471d3437d19ffecde7aa67e Mon Sep 17 00:00:00 2001 From: dimasciput Date: Fri, 28 Jul 2023 08:48:18 +0700 Subject: [PATCH] Fix test --- bims/models/location_site.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bims/models/location_site.py b/bims/models/location_site.py index fd2ef4af6..c5353c4af 100644 --- a/bims/models/location_site.py +++ b/bims/models/location_site.py @@ -201,6 +201,12 @@ def get_geometry(self): geometry = None validation_error = ValidationError('Only one geometry allowed.') + if ( + self.geometry_point and + self.location_type.allowed_geometry == 'POINT' + ): + return self.geometry_point + if self.geometry_polygon: if geometry: raise validation_error