Skip to content

Commit

Permalink
- set to completed step to check if no _ALLOW_TIME_STEP is false [Re…
Browse files Browse the repository at this point in the history
…fers #3800]
  • Loading branch information
afabiani committed Nov 8, 2018
1 parent d5aa2df commit fcd711f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion geonode/security/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ def test_save_and_delete_signals(self):
self.assertIsNotNone(test_perm_layer.bbox)
self.assertIsNotNone(test_perm_layer.srid)
self.assertIsNotNone(test_perm_layer.link_set)
self.assertEquals(len(test_perm_layer.link_set.all()), 7)
self.assertEquals(len(test_perm_layer.link_set.all()), 9)

# Layer Manipulation
from geonode.geoserver.upload import geoserver_upload
Expand Down
8 changes: 3 additions & 5 deletions geonode/upload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,14 @@ def time_step_view(request, upload_session):
'layer_attributes': layer_values[0].keys(),
'async_upload': is_async_step(upload_session)
}
upload_session.completed_step = 'check'
return render(request, 'upload/layer_upload_time.html', context=context)
else:
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'check'
return next_step_response(request, upload_session)
else:
# TODO: Error
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'check'
upload_session.completed_step = 'check'
return next_step_response(request, upload_session)
elif request.method != 'POST':
raise Exception()
Expand Down Expand Up @@ -505,8 +506,6 @@ def time_step_view(request, upload_session):
upload_session.import_session = import_session.reload()

if start_attribute_and_type:
upload_session.completed_step = 'check'

def tx(type_name):
# return None if type_name is None or type_name == 'Date' \
return None if type_name is None \
Expand All @@ -524,9 +523,8 @@ def tx(type_name):
precision_value=cleaned['precision_value'],
precision_step=cleaned['precision_step'],
)
else:
upload_session.completed_step = 'time' if _ALLOW_TIME_STEP else 'check'

upload_session.completed_step = 'check'
return next_step_response(request, upload_session)


Expand Down

0 comments on commit fcd711f

Please sign in to comment.