Skip to content

Commit

Permalink
Changes the number of letters used to scan for ftp:// (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
mildewey authored and pkerpedjiev committed Mar 6, 2019
1 parent 5a189e2 commit 1638783
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tilesets/management/commands/ingest_tileset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1638783

Please sign in to comment.