From c24965c6d5de4ecde7fd844c0feda05a096f72ac Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 5 Mar 2012 14:15:17 +0530 Subject: [PATCH] fix in backup download url --- py/webnotes/utils/backups.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/py/webnotes/utils/backups.py b/py/webnotes/utils/backups.py index 47ee1b89f6..03db0a12d1 100644 --- a/py/webnotes/utils/backups.py +++ b/py/webnotes/utils/backups.py @@ -34,7 +34,7 @@ from datetime import datetime #Global constants -from webnotes.defs import backup_path, backup_link_path, backup_url +from webnotes.defs import backup_path, backup_link_path verbose = 0 #------------------------------------------------------------------------------- @@ -98,6 +98,11 @@ class BackupGenerator: """ Sends the link to backup file located at erpnext/backups """ + if hasattr(webnotes.defs, 'backup_url'): + backup_url = webnotes.defs.backup_url + else: + backup_url = webnotes.conn.get_value('Website Settings', + 'Website Settings', 'subdomain') or '' file_url = os.path.join(backup_url, backup_file) from webnotes.utils.email_lib import sendmail