fix get_color() error when space geometries are created in a changeset
@@ -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'):
