forked from s_ranjbar/city_retrofit
Set usage to unknown if it cannot be determined.
This commit is contained in:
parent
3d883fc068
commit
3a7dccff8c
|
@ -60,6 +60,9 @@ class City(Repository):
|
|||
for building in city.buildings:
|
||||
object_usage = ''
|
||||
for internal_zone in building.internal_zones:
|
||||
if internal_zone is None or internal_zone.usages is None:
|
||||
object_usage = 'Unknown'
|
||||
else:
|
||||
for usage in internal_zone.usages:
|
||||
object_usage = f'{object_usage}{usage.name}_{usage.percentage} '
|
||||
object_usage = object_usage.rstrip()
|
||||
|
|
Loading…
Reference in New Issue
Block a user