Admin basket: update/fix file import, download, delete

remove useless AdminBasketFile model definition
cleanups, typings
This commit is contained in:
phil 2024-04-20 10:58:12 +05:30
parent 6139f49aae
commit c613fd35d9
5 changed files with 123 additions and 136 deletions
src/gisaf

View file

@ -39,7 +39,7 @@ class Importer:
The main process is executed by do_import(file)
Subclasses should define read_file and process_df.
"""
basket = None
basket = None # type hint: baskets.Basket
async def do_import(self, file_record, dry_run=False, **kwargs) -> BasketImportResult:
"""
@ -181,7 +181,7 @@ class RawSurveyImporter(Importer):
## Import to raw_survey_data table
## PostGis specific: add SRID
gdf['geom'] = gdf['geometry'].apply(lambda g: dumps_wkb(g, srid=conf.raw_survey['srid'], hex=True))
gdf['geom'] = gdf['geometry'].apply(lambda g: dumps_wkb(g, srid=conf.geo.raw_survey.srid, hex=True))
if not dry_run:
await upsert_df(gdf, model)