From 48e3f7bec8a626e642a00bf008a83c02adcde110 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Tue, 13 Mar 2018 12:33:29 +0530 Subject: [PATCH] transaction log reverted --- .../transaction_log/transaction_log.py | 11 ++------ frappe/public/js/frappe/chat.js | 28 ------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/frappe/core/doctype/transaction_log/transaction_log.py b/frappe/core/doctype/transaction_log/transaction_log.py index 81f08a0080..b5803aca4a 100644 --- a/frappe/core/doctype/transaction_log/transaction_log.py +++ b/frappe/core/doctype/transaction_log/transaction_log.py @@ -29,19 +29,12 @@ class TransactionLog(Document): def hash_line(self): sha = hashlib.sha256() - sha.update('{}{}{}'.format( - frappe.safe_encode(str(self.row_index)), - frappe.safe_encode(str(self.timestamp)), - frappe.safe_encode(str(self.data)) - )) + sha.update(str(self.row_index) + str(self.timestamp) + str(self.data)) return sha.hexdigest() def hash_chain(self): sha = hashlib.sha256() - sha.update('{}{}{}'.format( - frappe.safe_encode(str(self.transaction_hash)), - frappe.safe_encode(str(self.previous_hash)) - )) + sha.update(str(self.transaction_hash) + str(self.previous_hash)) return sha.hexdigest() diff --git a/frappe/public/js/frappe/chat.js b/frappe/public/js/frappe/chat.js index cd2ab04bcd..8ee95d9ac2 100644 --- a/frappe/public/js/frappe/chat.js +++ b/frappe/public/js/frappe/chat.js @@ -1,39 +1,11 @@ // Frappe Chat // Author - Achilles Rasquinha -/** - * -------------------------------------------------------------------------------- - * Developer Notes - * -------------------------------------------------------------------------------- - */ - /* eslint semi: "never" */ // Fuck semicolons - https://mislav.net/2010/05/semicolons // frappe extensions -// frappe.model extensions -frappe.provide('frappe.model') -/** - * @description Subscribe to a model for realtime updates. - * - * @example - * frappe.model.subscribe('User') - * // Subscribe to all User records - * - * frappe.model.subscribe('User', 'achilles@frappe.io') - * frappe.model.subscribe('User', ['achilles@frappe.io', 'rushabh@frappe.io']) - * // Subscribe to User of name(s) - * - * frappe.model.subscribe('User', 'achilles@frappe.io', 'username') - * frappe.model.subscribe('User', ['achilles@frappe.io', 'rushabh@frappe.io'], ['email', 'username']) - * // Subscribe to User of name for field(s) - * - * @todo Under Development - */ -frappe.model.subscribe = (doctype, name, field) => - frappe.realtime.publish('frappe.model:subscribe', { doctype: doctype, name: name, field: field }) - /** * @description The base class for all Frappe Errors. *