remove geometry from serialized data using filter parameter
This commit is contained in:
parent
3fd5c49926
commit
fc53e3197d
6 changed files with 35 additions and 17 deletions
|
@ -137,6 +137,8 @@ class Area(SpaceGeometryMixin, SpecificLocation, models.Model):
|
|||
|
||||
@property
|
||||
def grid_square(self):
|
||||
if "geometry" in self.get_deferred_fields():
|
||||
return None
|
||||
return grid.get_squares_for_bounds(self.geometry.bounds) or ''
|
||||
|
||||
def details_display(self, editor_url=True, **kwargs):
|
||||
|
@ -265,6 +267,8 @@ class POI(SpaceGeometryMixin, SpecificLocation, models.Model):
|
|||
|
||||
@property
|
||||
def grid_square(self):
|
||||
if "geometry" in self.get_deferred_fields():
|
||||
return None
|
||||
return grid.get_square_for_point(self.x, self.y) or ''
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue