From d56d53403c176b5b699d35bd89bd1f5aaa13c0bc Mon Sep 17 00:00:00 2001 From: Mark Dewey Date: Wed, 6 Mar 2019 12:41:36 -0700 Subject: [PATCH] Changes the number of letters used to scan for ftp:// --- tilesets/management/commands/ingest_tileset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tilesets/management/commands/ingest_tileset.py b/tilesets/management/commands/ingest_tileset.py index a1a7de3e..e0d0d044 100644 --- a/tilesets/management/commands/ingest_tileset.py +++ b/tilesets/management/commands/ingest_tileset.py @@ -20,7 +20,7 @@ def ingest(filename=None, datatype=None, filetype=None, coordSystem='', coordSys if not filetype: raise CommandError('Filetype has to be specified') - + django_file = None # if we're ingesting a url, place it relative to the httpfs directories @@ -31,7 +31,7 @@ def ingest(filename=None, datatype=None, filetype=None, coordSystem='', coordSys if filename[:8] == 'https://': filename = "{}..".format(filename.replace('https:/', 'https')) no_upload=True - if filename[:8] == 'ftp://': + if filename[:6] == 'ftp://': filename = "{}..".format(filename.replace('ftp:/', 'ftp')) no_upload=True @@ -61,7 +61,7 @@ def ingest(filename=None, datatype=None, filetype=None, coordSystem='', coordSys project_obj = tm.Project.objects.create( name=project_name ) - + return tm.Tileset.objects.create( datafile=django_file, filetype=filetype,