fix: Update user profile picture, if employee profile pic is changed (#37483)

* fix: Update user pic if employee pic is changed.

* fix: Update condition
This commit is contained in:
Niraj Gautam 2023-10-21 18:13:53 +05:30 committed by GitHub
parent 98cc7434d2
commit 4aa841786f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ class Employee(NestedSet):
user.gender = self.gender
if self.image:
if not user.user_image:
if not user.user_image or self.has_value_changed("image"):
user.user_image = self.image
try:
frappe.get_doc(