Fix api stores
Rename in category table: geom_type to gis_type
This commit is contained in:
parent
c0c308a657
commit
956147aea8
7 changed files with 45 additions and 22 deletions
|
@ -60,9 +60,9 @@ class CategoryBase(BaseModel):
|
|||
status: str = Field(min_length=1, max_length=1)
|
||||
custom: bool | None
|
||||
auto_import: bool = True
|
||||
geom_type: str = Field(max_length=50,
|
||||
foreign_key='category_model_type.name',
|
||||
default='Point')
|
||||
gis_type: str = Field(max_length=50,
|
||||
foreign_key='category_model_type.name',
|
||||
default='Point')
|
||||
long_name: str | None = Field(max_length=50)
|
||||
style: str | None = Field(sa_type=TEXT)
|
||||
symbol: str | None = Field(max_length=1)
|
||||
|
@ -108,7 +108,7 @@ class CategoryBase(BaseModel):
|
|||
@computed_field
|
||||
@property
|
||||
def mapbox_type(self) -> str:
|
||||
return self.mapbox_type_custom or mapbox_type_mapping[self.geom_type]
|
||||
return self.mapbox_type_custom or mapbox_type_mapping[self.gis_type]
|
||||
|
||||
|
||||
class Category(CategoryBase, table=True):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue