Merge pull request #11880 from stephenBDT/fix-redis-dependency-during-setup-1

fix: No redis dependency during tests and install
This commit is contained in:
mergify[bot] 2020-12-15 07:02:51 +00:00 committed by GitHub
commit c1665ac76a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,15 +98,16 @@ class User(Document):
self.share_with_self()
clear_notifications(user=self.name)
frappe.clear_cache(user=self.name)
now=frappe.flags.in_test or frappe.flags.in_install
self.send_password_notification(self.__new_password)
frappe.enqueue(
'frappe.core.doctype.user.user.create_contact',
user=self,
ignore_mandatory=True,
now=frappe.flags.in_test or frappe.flags.in_install
now=now
)
if self.name not in ('Administrator', 'Guest') and not self.user_image:
frappe.enqueue('frappe.core.doctype.user.user.update_gravatar', name=self.name)
frappe.enqueue('frappe.core.doctype.user.user.update_gravatar', name=self.name, now=now)
# Set user selected timezone
if self.time_zone: