fix get_color() error when space geometries are created in a changeset
This commit is contained in:
parent
7e9c87c8ea
commit
936b2c4b3d
1 changed files with 2 additions and 2 deletions
|
@ -26,10 +26,10 @@ class SpaceGeometryMixin(GeometryMixin):
|
|||
def level_id(self):
|
||||
return self.space.level_id
|
||||
|
||||
def get_geojson_properties(self, *args, **kwargs) -> dict:
|
||||
def get_geojson_properties(self, *args, instance=None, **kwargs) -> dict:
|
||||
result = super().get_geojson_properties(*args, **kwargs)
|
||||
if hasattr(self, 'get_color'):
|
||||
color = self.get_color()
|
||||
color = self.get_color(instance=instance)
|
||||
if color:
|
||||
result['color'] = color
|
||||
if hasattr(self, 'opacity'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue