Skip to content

Commit

Permalink
sync: ensure layer add admin page opens without exceptions
Browse files Browse the repository at this point in the history
related to #178
  • Loading branch information
nemesifier committed Oct 1, 2014
1 parent bfcdddb commit 4d7a615
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nodeshot/interop/sync/templates/admin/layer_change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
external_info.fadeToggle(250);
});
// when synchronizer_path is changed
{% if object_id %}
var reload_schema_url = "{% url 'layer_external_reload_schema' object_id %}",
csrftoken = $('#layer_form input[name=csrfmiddlewaretoken]').val();
$('#external-group').delegate(
Expand All @@ -42,7 +43,8 @@
});
}
)
{% endif %}
});
})(grp.jQuery);
</script>
{% endblock %}
{% endblock %}
4 changes: 4 additions & 0 deletions nodeshot/interop/sync/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def test_layer_admin(self):
response = self.client.get(url)
self.assertEqual(response.status_code, 200)

url = reverse('admin:layers_layer_add')
response = self.client.get(url)
self.assertEqual(response.status_code, 200)

def test_config_validation(self):
layer = Layer.objects.external()[0]
layer.minimum_distance = 0
Expand Down

0 comments on commit 4d7a615

Please sign in to comment.