Kaynağa Gözat

Merge pull request #16172 from resilient-tech/remove-unused-update-doc

version-14
Suraj Shetty 3 yıl önce
committed by GitHub
ebeveyn
işleme
287e77b08a
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
2 değiştirilmiş dosya ile 0 ekleme ve 32 silme
  1. +0
    -20
      frappe/desk/doctype/kanban_board/kanban_board.py
  2. +0
    -12
      frappe/public/js/frappe/views/kanban/kanban_board.js

+ 0
- 20
frappe/desk/doctype/kanban_board/kanban_board.py Dosyayı Görüntüle

@@ -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'''


+ 0
- 12
frappe/public/js/frappe/views/kanban/kanban_board.js Dosyayı Görüntüle

@@ -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();


Yükleniyor…
İptal
Kaydet