From: Morris Jobke Date: Tue, 26 Jul 2016 10:03:16 +0000 (+0200) Subject: create an operation based on the correct model X-Git-Tag: v10.0RC1~50^2~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6eabcf134f728c652028a8e417ff444297971cf0;p=nextcloud-server.git create an operation based on the correct model --- diff --git a/apps/workflowengine/js/admin.js b/apps/workflowengine/js/admin.js index a29ad82ab89..f51352c45e4 100644 --- a/apps/workflowengine/js/admin.js +++ b/apps/workflowengine/js/admin.js @@ -341,18 +341,13 @@ this._initialize('OCA\\WorkflowEngine\\Operation'); }, _initialize: function(classname) { - var data = {}; - if (this.operationsClass !== null) { - data['class'] = this.operationsClass; - } this.collection.fetch({data: { 'class': classname }}); this.collection.once('sync', this.render, this); }, add: function() { - var operation = new OCA.WorkflowEngine.Operation(); - this.collection.add(operation); + var operation = this.collection.create(); this.renderOperation(operation); }, renderOperation: function(operation){