Fix map type

This commit is contained in:
phil 2024-02-29 12:41:35 +05:30
parent 53216269cb
commit bcfda603be
2 changed files with 4 additions and 4 deletions

View file

@ -13,6 +13,7 @@ class Store(StoreNameOnly):
custom: bool
description: str
#extra: dict[str, Any] | None
gis_type: str
group: str
#icon: str
in_menu: bool
@ -22,13 +23,12 @@ class Store(StoreNameOnly):
long_name: str | None
#mapbox_layout: dict[str, Any] | None
#mapbox_paint: dict[str, Any] | None
#mapbox_type: str
type: str
# mapbox_type_custom: str | None
#mapbox_type_default: str
minor_group_1: str | None
minor_group_2: str | None
#model: GeoModel
gis_type: str
#name_letter: str
#name_number: int
#raw_model: GeoPointSurveyModel

View file

@ -564,8 +564,8 @@ class ModelRegistry:
self.stores['attribution'] \
= zip(*self.stores.apply(fill_columns_from_model, axis=1))
#self.stores['mapbox_type_custom'] = self.stores['mapbox_type_custom'].replace('', np.nan).fillna(np.nan)
self.stores['mapbox_type'] = self.stores['mapbox_type_custom'].fillna(
self.stores['mapbox_type_custom'] = self.stores['mapbox_type_custom'].replace('', np.nan).fillna(np.nan)
self.stores['type'] = self.stores['mapbox_type_custom'].fillna(
self.stores['mapbox_type_default']
)