diff --git a/flaskinventory/add/routes.py b/flaskinventory/add/routes.py index 36911819..fd0f3667 100644 --- a/flaskinventory/add/routes.py +++ b/flaskinventory/add/routes.py @@ -173,7 +173,10 @@ def new(dgraph_type=None, draft=None, populate_form: dict = None): fields = list(form.data.keys()) fields.remove('submit') - fields.remove('csrf_token') + try: + fields.remove('csrf_token') + except: + pass if dgraph_type in ['Tool', 'ScientificPublication', 'Dataset', 'Corpus']: show_sidebar = True diff --git a/flaskinventory/static/js/networkplot.js b/flaskinventory/static/js/networkplot.js index 2c7e9d0c..6061e5b1 100644 --- a/flaskinventory/static/js/networkplot.js +++ b/flaskinventory/static/js/networkplot.js @@ -318,7 +318,7 @@ function MakeNetworkPlot(uid, endpoint, divId) { fetch(endpoint, { method: 'POST', headers: { - 'X-CSRFToken': csrftoken, + // 'X-CSRFToken': csrftoken, 'Content-Type': 'application/json', }, body: JSON.stringify(uid), diff --git a/flaskinventory/templates/add/newsource.html b/flaskinventory/templates/add/newsource.html index ef36266f..b85d0914 100644 --- a/flaskinventory/templates/add/newsource.html +++ b/flaskinventory/templates/add/newsource.html @@ -954,7 +954,6 @@