add missing properties in serialization
This commit is contained in:
parent
055df254e2
commit
5f848104a2
2 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,7 @@ class Space(SpecificLocation, LevelGeometryMixin, models.Model):
|
||||||
|
|
||||||
def _serialize(self, geometry=True, **kwargs):
|
def _serialize(self, geometry=True, **kwargs):
|
||||||
result = super()._serialize(geometry=geometry, **kwargs)
|
result = super()._serialize(geometry=geometry, **kwargs)
|
||||||
|
result['outside'] = self.outside
|
||||||
result['height'] = None if self.height is None else float(str(self.height))
|
result['height'] = None if self.height is None else float(str(self.height))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ class Level(SpecificLocation, models.Model):
|
||||||
|
|
||||||
def _serialize(self, level=True, **kwargs):
|
def _serialize(self, level=True, **kwargs):
|
||||||
result = super()._serialize(**kwargs)
|
result = super()._serialize(**kwargs)
|
||||||
|
result['on_top_of'] = self.on_top_of_id
|
||||||
result['base_altitude'] = float(str(self.base_altitude))
|
result['base_altitude'] = float(str(self.base_altitude))
|
||||||
result['default_height'] = float(str(self.default_heights))
|
result['default_height'] = float(str(self.default_heights))
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue