diff --git a/js/apps/system/aardvark/frontend/js/arango/arango.js b/js/apps/system/aardvark/frontend/js/arango/arango.js index 6a1daecea2..66ac399918 100644 --- a/js/apps/system/aardvark/frontend/js/arango/arango.js +++ b/js/apps/system/aardvark/frontend/js/arango/arango.js @@ -122,8 +122,9 @@ window.arangoHelper = { return val.substr(0, 1) === '_'; }, - collectionApiType: function (identifier) { - if (this.CollectionTypes[identifier] === undefined) { + collectionApiType: function (identifier, refresh) { + // set "refresh" to disable caching collection type + if (refresh || this.CollectionTypes[identifier] === undefined) { this.CollectionTypes[identifier] = window.arangoDocumentStore .getCollectionInfo(identifier).type; } diff --git a/js/apps/system/aardvark/frontend/js/views/documentsView.js b/js/apps/system/aardvark/frontend/js/views/documentsView.js index 91a302f8ae..abbc788391 100644 --- a/js/apps/system/aardvark/frontend/js/views/documentsView.js +++ b/js/apps/system/aardvark/frontend/js/views/documentsView.js @@ -331,7 +331,8 @@ var documentsView = Backbone.View.extend({ addDocument: function () { var collid = window.location.hash.split("/")[1]; - var doctype = arangoHelper.collectionApiType(collid); + // second parameter is "true" to disable caching of collection type + var doctype = arangoHelper.collectionApiType(collid, true); if (doctype === 'edge') { $('#edgeCreateModal').modal('show');