Allow stringifying sample with unknown pressure
This commit is contained in:
parent
2f15dea8c4
commit
650718a00b
1 changed files with 4 additions and 3 deletions
|
@ -54,9 +54,10 @@ class SoundingSample(DatabaseTable):
|
||||||
self.wind_speed: float = None
|
self.wind_speed: float = None
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
parts = [
|
parts = list()
|
||||||
("%.2fmb" % self.pressure)
|
|
||||||
]
|
if self.pressure is not None:
|
||||||
|
parts.append("%.2fmb" % self.pressure)
|
||||||
|
|
||||||
if self.height is not None:
|
if self.height is not None:
|
||||||
parts.append("%.1fm" % self.height)
|
parts.append("%.1fm" % self.height)
|
||||||
|
|
Loading…
Add table
Reference in a new issue