Procházet zdrojové kódy

fix: get timezone in user_info

version-14
Shariq Ansari před 3 roky
rodič
revize
54b3a32968
2 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. +1
    -0
      cypress/integration/datetime.js
  2. +3
    -2
      frappe/utils/__init__.py

+ 1
- 0
cypress/integration/datetime.js Zobrazit soubor

@@ -103,6 +103,7 @@ context('Control Date, Time and DateTime', () => {
input_value: '12-02-2019 11:00' // admin timezone (Asia/Kolkata)
}
];

datetime_formats.forEach(d => {
it(`test datetime format ${d.date_format} ${d.time_format}`, () => {
cy.set_value('System Settings', 'System Settings', {


+ 3
- 2
frappe/utils/__init__.py Zobrazit soubor

@@ -901,10 +901,11 @@ def dictify(arg):
def add_user_info(user, user_info):
if user not in user_info:
info = frappe.db.get_value("User",
user, ["full_name", "user_image", "name", 'email'], as_dict=True) or frappe._dict()
user, ["full_name", "user_image", "name", 'email', 'time_zone'], as_dict=True) or frappe._dict()
user_info[user] = frappe._dict(
fullname = info.full_name or user,
image = info.user_image,
name = user,
email = info.email
email = info.email,
time_zone = info.time_zone
)

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