Merge branch 'develop' into develop
This commit is contained in:
commit
f4df8cee72
6 changed files with 22 additions and 15 deletions
|
|
@ -453,16 +453,17 @@ def evaluate_alert(doc: Document, alert, event):
|
|||
doc.reload()
|
||||
alert.send(doc)
|
||||
except TemplateError:
|
||||
frappe.throw(
|
||||
_("Error while evaluating Notification {0}. Please fix your template.").format(alert)
|
||||
message = _("Error while evaluating Notification {0}. Please fix your template.").format(
|
||||
frappe.utils.get_link_to_form("Notification", alert.name)
|
||||
)
|
||||
frappe.throw(message, title=_("Error in Notification"))
|
||||
except Exception as e:
|
||||
error_log = frappe.log_error(message=frappe.get_traceback(), title=str(e))
|
||||
frappe.throw(
|
||||
_("Error in Notification: {}").format(
|
||||
frappe.utils.get_link_to_form("Error Log", error_log.name)
|
||||
)
|
||||
)
|
||||
title = str(e)
|
||||
message = frappe.get_traceback()
|
||||
frappe.log_error(message=message, title=title)
|
||||
|
||||
msg = f"<details><summary>{title}</summary>{message}</details>"
|
||||
frappe.throw(msg, title=_("Error in Notification"))
|
||||
|
||||
|
||||
def get_context(doc):
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import pytz
|
|||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cint, cstr
|
||||
from frappe.utils import cint, cstr, get_time_zone
|
||||
|
||||
|
||||
class TokenCache(Document):
|
||||
|
|
@ -52,7 +52,9 @@ class TokenCache(Document):
|
|||
return self
|
||||
|
||||
def get_expires_in(self):
|
||||
system_timezone = pytz.timezone(get_time_zone())
|
||||
modified = frappe.utils.get_datetime(self.modified)
|
||||
modified = system_timezone.localize(modified)
|
||||
expiry_utc = modified.astimezone(pytz.utc) + timedelta(seconds=self.expires_in)
|
||||
now_utc = datetime.utcnow().replace(tzinfo=pytz.utc)
|
||||
return cint((expiry_utc - now_utc).total_seconds())
|
||||
|
|
|
|||
|
|
@ -422,6 +422,7 @@ frappe.ui.form.Toolbar = class Toolbar {
|
|||
if (
|
||||
cint(me.frm.doc.docstatus) != 1 &&
|
||||
!me.frm.doc.__islocal &&
|
||||
!frappe.model.is_single(me.frm.doctype) &&
|
||||
frappe.model.can_delete(me.frm.doctype)
|
||||
) {
|
||||
this.page.add_menu_item(
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,10 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
width: parseInt(column.width) || null,
|
||||
editable: false,
|
||||
compareValue: compareFn,
|
||||
format: (value, row, column, data) => {
|
||||
format: (value, row, column, data, for_filter = false) => {
|
||||
if (for_filter && column?.fieldtype === "Link") {
|
||||
return value || "";
|
||||
}
|
||||
if (this.report_settings.formatter) {
|
||||
return this.report_settings.formatter(
|
||||
value,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-glob": "^3.2.5",
|
||||
"frappe-charts": "2.0.0-rc22",
|
||||
"frappe-datatable": "^1.17.1",
|
||||
"frappe-datatable": "^1.17.2",
|
||||
"frappe-gantt": "^0.6.0",
|
||||
"highlight.js": "^10.4.1",
|
||||
"html5-qrcode": "^2.0.11",
|
||||
|
|
|
|||
|
|
@ -1435,10 +1435,10 @@ frappe-charts@2.0.0-rc22:
|
|||
resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-2.0.0-rc22.tgz#9a5a747febdc381a1d4d7af96e89cf519dfba8c0"
|
||||
integrity sha512-N7f/8979wJCKjusOinaUYfMxB80YnfuVLrSkjpj4LtyqS0BGS6SuJxUnb7Jl4RWUFEIs7zEhideIKnyLeFZF4Q==
|
||||
|
||||
frappe-datatable@^1.17.1:
|
||||
version "1.17.1"
|
||||
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.17.1.tgz#795ee79a420df07b963b7decf489045d5993cc0b"
|
||||
integrity sha512-qqvmsaYbQUwCAtGnhmTN8jrdvXW6YfRLTZS6ufb3b1ibFEMUbE04rEFJF7TJRd2ugSk80seS2OPGTZGw+V2b0A==
|
||||
frappe-datatable@^1.17.2:
|
||||
version "1.17.2"
|
||||
resolved "https://registry.yarnpkg.com/frappe-datatable/-/frappe-datatable-1.17.2.tgz#8c717bd40541b8ad0db871e129dc02cff4290df0"
|
||||
integrity sha512-Jk8/3860Zya7Si2cZYEjVj0Gfy7CqhPx/rVZCg2fZ1+NlaOvBsey/zFEIe2yWak8PiJ1Fw9VgOevKOoZ/ckmsw==
|
||||
dependencies:
|
||||
hyperlist "^1.0.0-beta"
|
||||
lodash "^4.17.5"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue