diff --git a/frappe/__init__.py b/frappe/__init__.py
index 89792175d1..30858210ff 100644
--- a/frappe/__init__.py
+++ b/frappe/__init__.py
@@ -17,7 +17,7 @@ from faker import Faker
from .exceptions import *
from .utils.jinja import (get_jenv, get_template, render_template, get_email_from_template, get_jloader)
-__version__ = '10.1.67'
+__version__ = '10.1.68'
__title__ = "Frappe Framework"
local = Local()
diff --git a/frappe/core/doctype/report/test_report.py b/frappe/core/doctype/report/test_report.py
index 5591035c08..a8b756804e 100644
--- a/frappe/core/doctype/report/test_report.py
+++ b/frappe/core/doctype/report/test_report.py
@@ -61,9 +61,8 @@ class TestReport(unittest.TestCase):
with open(os.path.join(os.path.dirname(__file__), 'user_activity_report_without_sort.json'), 'r') as f:
frappe.get_doc(json.loads(f.read())).insert()
- report = frappe.get_doc('Report', 'User Activity Report Without Sort')
- # this would raise an error without the fix added along with this test case
columns, data = report.get_data()
+
self.assertEqual(columns[0].get('label'), 'ID')
self.assertEqual(columns[1].get('label'), 'User Type')
self.assertTrue('Administrator' in [d[0] for d in data])
diff --git a/frappe/core/doctype/user/test_user.py b/frappe/core/doctype/user/test_user.py
index 760bffe772..7f4a264e1a 100644
--- a/frappe/core/doctype/user/test_user.py
+++ b/frappe/core/doctype/user/test_user.py
@@ -276,6 +276,13 @@ class TestUser(unittest.TestCase):
self.assertEqual(extract_mentions(user_name)[0], "test-user")
user_name = "Testing comment, @test.user@example.com please check."
self.assertEqual(extract_mentions(user_name)[0], "test.user@example.com")
+ user_name = "
@test_user@example.com and @test.again@example1.com
This is a test.
"
+ self.assertEqual(extract_mentions(user_name)[0], "test_user@example.com")
+ self.assertEqual(extract_mentions(user_name)[1], "test.again@example1.com")
+ user_name = "@user@example.com Test @test-comment@xyz.com
Test for comment mentions @test@abc.com
"
+ self.assertEqual(extract_mentions(user_name)[0], "user@example.com")
+ self.assertEqual(extract_mentions(user_name)[1], "test-comment@xyz.com")
+ self.assertEqual(extract_mentions(user_name)[2], "test@abc.com")
def delete_contact(user):
frappe.db.sql("DELETE FROM `tabContact` WHERE `email_id`= %s", user)
diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py
index 90a74b6402..ead7883447 100644
--- a/frappe/core/doctype/user/user.py
+++ b/frappe/core/doctype/user/user.py
@@ -924,7 +924,7 @@ def notify_admin_access_to_system_manager(login_manager=None):
def extract_mentions(txt):
"""Find all instances of @name in the string.
The mentions will be separated by non-word characters or may appear at the start of the string"""
- txt = txt.replace("
", "
")
+ txt = txt.replace("", "
")
txt = re.sub(r'(<[a-zA-Z\/][^>]*>)', '', txt)
return re.findall(r'(?:[^\w\.\-\@]|^)@([\w\.\-\@]*)', txt)
diff --git a/frappe/data/sample_site_config.json b/frappe/data/sample_site_config.json
new file mode 100644
index 0000000000..36818ef286
--- /dev/null
+++ b/frappe/data/sample_site_config.json
@@ -0,0 +1,42 @@
+{
+ "db_name": "testdb",
+ "db_password": "password",
+ "mute_emails": true,
+
+ "limits": {
+ "emails": 1500,
+ "space": 0.157,
+ "expiry": "2016-07-25",
+ "users": 1
+ },
+
+ "developer_mode": 1,
+ "auto_cache_clear": true,
+ "disable_website_cache": true,
+ "max_file_size": 1000000,
+
+ "mail_server": "localhost",
+ "mail_login": null,
+ "mail_password": null,
+ "mail_port": 25,
+ "use_ssl": 0,
+ "auto_email_id": "hello@example.com",
+
+ "google_login": {
+ "client_id": "google_client_id",
+ "client_secret": "google_client_secret"
+ },
+ "github_login": {
+ "client_id": "github_client_id",
+ "client_secret": "github_client_secret"
+ },
+ "facebook_login": {
+ "client_id": "facebook_client_id",
+ "client_secret": "facebook_client_secret"
+ },
+
+ "celery_broker": "redis://localhost",
+ "celery_result_backend": null,
+ "scheduler_interval": 300,
+ "celery_queue_per_site": true
+}
diff --git a/frappe/hooks.py b/frappe/hooks.py
index 223819b013..736749d65f 100644
--- a/frappe/hooks.py
+++ b/frappe/hooks.py
@@ -12,7 +12,7 @@ source_link = "https://github.com/frappe/frappe"
app_license = "MIT"
develop_version = '12.x.x-develop'
-staging_version = '11.0.3-beta.38'
+staging_version = '11.0.3-beta.39'
app_email = "info@frappe.io"
diff --git a/frappe/integrations/doctype/paypal_settings/paypal_settings.py b/frappe/integrations/doctype/paypal_settings/paypal_settings.py
index 83a1cb0aab..62e0555437 100644
--- a/frappe/integrations/doctype/paypal_settings/paypal_settings.py
+++ b/frappe/integrations/doctype/paypal_settings/paypal_settings.py
@@ -66,12 +66,12 @@ More Details:
from __future__ import unicode_literals
import frappe
import json
+import pytz
from frappe import _
-from datetime import datetime
from six.moves.urllib.parse import urlencode
from frappe.model.document import Document
from frappe.integrations.utils import create_request_log, make_post_request, create_payment_gateway
-from frappe.utils import get_url, call_hook_method, cint, get_timestamp, cstr, now, date_diff, get_datetime
+from frappe.utils import get_url, call_hook_method, cint, get_datetime
api_path = '/api/method/frappe.integrations.doctype.paypal_settings.paypal_settings'
@@ -309,9 +309,11 @@ def create_recurring_profile(token, payerid):
"INITAMT": data.get("upfront_amount")
})
- starts_at = get_datetime(subscription_details.get("start_date")) or frappe.utils.now_datetime()
status_changed_to = 'Completed' if data.get("starting_immediately") or updating else 'Verified'
+ starts_at = get_datetime(subscription_details.get("start_date")) or frappe.utils.now_datetime()
+ starts_at = starts_at.replace(tzinfo=pytz.timezone(frappe.utils.get_time_zone())).astimezone(pytz.utc)
+
#"PROFILESTARTDATE": datetime.utcfromtimestamp(get_timestamp(starts_at)).isoformat()
params.update({
"PROFILESTARTDATE": starts_at.isoformat()