Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
98025ac32c
@ -333,7 +333,7 @@ def add_holidays(events, start, end, employee, company):
|
||||
|
||||
@webnotes.whitelist()
|
||||
def query_for_permitted_employees(doctype, txt, searchfield, start, page_len, filters):
|
||||
txt = cstr(txt) + "%"
|
||||
txt = "%" + cstr(txt) + "%"
|
||||
|
||||
return webnotes.conn.sql("""select name, employee_name from `tabEmployee` emp
|
||||
where status = 'Active' and docstatus < 2 and
|
||||
@ -346,4 +346,4 @@ def query_for_permitted_employees(doctype, txt, searchfield, start, page_len, fi
|
||||
case when name like %s then 0 else 1 end,
|
||||
case when employee_name like %s then 0 else 1 end,
|
||||
name limit %s, %s""" % tuple([searchfield] + ["%s"]*8),
|
||||
(txt, txt, webnotes.session.user, webnotes.session.user, txt, txt, start, page_len), debug=1)
|
||||
(txt, txt, webnotes.session.user, webnotes.session.user, txt, txt, start, page_len))
|
||||
|
@ -27,8 +27,8 @@ def take_backups_dropbox():
|
||||
from setup.doctype.backup_manager.backup_dropbox import backup_to_dropbox
|
||||
backup_to_dropbox()
|
||||
send_email(True, "Dropbox")
|
||||
except Exception, e:
|
||||
send_email(False, "Dropbox", e)
|
||||
except Exception:
|
||||
send_email(False, "Dropbox", webnotes.getTraceback())
|
||||
|
||||
#backup to gdrive
|
||||
@webnotes.whitelist()
|
||||
@ -37,8 +37,8 @@ def take_backups_gdrive():
|
||||
from setup.doctype.backup_manager.backup_googledrive import backup_to_gdrive
|
||||
backup_to_gdrive()
|
||||
send_email(True, "Google Drive")
|
||||
except Exception, e:
|
||||
send_email(False, "Google Drive", e)
|
||||
except Exception:
|
||||
send_email(False, "Google Drive", webnotes.getTraceback())
|
||||
|
||||
def send_email(success, service_name, error_status=None):
|
||||
if success:
|
||||
|
Loading…
x
Reference in New Issue
Block a user