Procházet zdrojové kódy

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

version-14
Suraj Shetty před 3 roky
committed by GitHub
rodič
revize
287e77b08a
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
2 změnil soubory, kde provedl 0 přidání a 32 odebrání
  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 Zobrazit soubor

@@ -76,26 +76,6 @@ def archive_restore_column(board_name, column_title, status):
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()
def update_order(board_name, order):
'''Save the order of cards in columns'''


+ 0
- 12
frappe/public/js/frappe/views/kanban/kanban_board.js Zobrazit soubor

@@ -150,18 +150,6 @@ frappe.provide("frappe.views");
}
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) {
// cache original order
const _cards = this.cards.slice();


Načítá se…
Zrušit
Uložit