for some reason ordereddict causes lots of overhead here

This commit is contained in:
Laura Klünder 2018-12-22 23:36:07 +01:00
parent 3b4e3bbdba
commit 05dab8acb5

View file

@ -33,10 +33,10 @@ class GeometryMixin(SerializableMixin):
if field.name in geometry_affecting_fields} if field.name in geometry_affecting_fields}
def get_geojson_properties(self, *args, **kwargs) -> dict: def get_geojson_properties(self, *args, **kwargs) -> dict:
result = OrderedDict(( result = {
('type', self.__class__.__name__.lower()), 'type': self.__class__.__name__.lower(),
('id', self.pk), 'id': self.id
)) }
if getattr(self, 'bounds', False): if getattr(self, 'bounds', False):
result['bounds'] = True result['bounds'] = True
return result return result