@@ -76,26 +76,6 @@ def archive_restore_column(board_name, column_title, status): | |||||
return doc.columns | return doc.columns | ||||
@frappe.whitelist() | |||||
def update_doc(doc): | |||||
'''Updates the doc when card is edited''' | |||||
doc = json.loads(doc) | |||||
try: | |||||
to_update = doc | |||||
doctype = doc['doctype'] | |||||
docname = doc['name'] | |||||
doc = frappe.get_doc(doctype, docname) | |||||
doc.update(to_update) | |||||
doc.save() | |||||
except: | |||||
return { | |||||
'doc': doc, | |||||
'exc': frappe.utils.get_traceback() | |||||
} | |||||
return doc | |||||
@frappe.whitelist() | @frappe.whitelist() | ||||
def update_order(board_name, order): | def update_order(board_name, order): | ||||
'''Save the order of cards in columns''' | '''Save the order of cards in columns''' | ||||
@@ -150,18 +150,6 @@ frappe.provide("frappe.views"); | |||||
} | } | ||||
updater.set({ cards: cards }); | updater.set({ cards: cards }); | ||||
}, | }, | ||||
update_doc: function(updater, doc, card) { | |||||
var state = this; | |||||
return frappe.call({ | |||||
method: method_prefix + "update_doc", | |||||
args: { doc: doc }, | |||||
freeze: true | |||||
}).then(function(r) { | |||||
var updated_doc = r.message; | |||||
var updated_card = prepare_card(card, state, updated_doc); | |||||
fluxify.doAction('update_card', updated_card); | |||||
}); | |||||
}, | |||||
update_order_for_single_card: function(updater, card) { | update_order_for_single_card: function(updater, card) { | ||||
// cache original order | // cache original order | ||||
const _cards = this.cards.slice(); | const _cards = this.cards.slice(); | ||||