Rename in category table: model_type to geom_type

This commit is contained in:
phil 2023-12-26 18:42:40 +05:30
parent b772e1bd80
commit c0c308a657
5 changed files with 16 additions and 15 deletions

View file

@ -205,7 +205,7 @@ class RawSurveyImporter(Importer):
gdf['geom'] = gdf.to_crs(conf.srid).geometry.apply(lambda g: dumps_wkb(g, srid=conf.srid, hex=True))
for category_name, category_gdf in gdf.groupby('category'):
category = registry.categories.loc[category_name]
if category.auto_import and category.model_type == 'Point':
if category.auto_import and category.geom_type == 'Point':
if not dry_run:
await upsert_df(category_gdf, category.model)