Skip to content

Commit

Permalink
[Fixes #3800] Uploading shapefiles without a datefield and time-enabl…
Browse files Browse the repository at this point in the history
…ed is False in importer settings fails in 2.7.x
  • Loading branch information
Alessio Fabiani committed Jun 13, 2018
1 parent 878ac6e commit 1f3978c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions geonode/upload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
scan_file
)
from .utils import (
_ALLOW_TIME_STEP,
_SUPPORTED_CRS,
_ASYNC_UPLOAD,
_geoserver_down_error_msg,
Expand Down Expand Up @@ -414,7 +415,7 @@ def check_step_view(request, upload_session):
upload_session.completed_step = 'check'
else:
# This command skip completely 'time' configuration
upload_session.completed_step = 'time'
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'run'
elif request.method != 'POST':
raise Exception()
return next_step_response(request, upload_session)
Expand Down Expand Up @@ -464,11 +465,11 @@ def time_step_view(request, upload_session):
}
return render(request, 'upload/layer_upload_time.html', context=context)
else:
upload_session.completed_step = 'time'
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'run'
return next_step_response(request, upload_session)
else:
# TODO: Error
upload_session.completed_step = 'time'
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'run'
return next_step_response(request, upload_session)
elif request.method != 'POST':
raise Exception()
Expand Down Expand Up @@ -522,7 +523,7 @@ def tx(type_name):
precision_step=cleaned['precision_step'],
)
else:
upload_session.completed_step = 'time'
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'run'

return next_step_response(request, upload_session)

Expand Down

0 comments on commit 1f3978c

Please sign in to comment.