Image of Employee is not fetching in Birthday Reminder

Hello All,

I have created a few Employees for Nestorbird Company & also add all the data of that particular employee (i.e. phone no. , employee image, email, birthdate), etc.
But when the birthday reminder has come for an Employee So in that Employee image is not fetching as shown in the below image.
Kindly help me with the same.

This is code :

def get_employees_who_are_born_today():
"""Get all employee born today & group them based on their company"""
from collections import defaultdict
employees_born_today = frappe.db.multisql({
	"mariadb": """
		SELECT `personal_email`, `company`, `company_email`, `user_id`, `employee_name` AS 'name', `image`
		FROM `tabEmployee`
		WHERE
			DAY(date_of_birth) = DAY(%(today)s)
		AND
			MONTH(date_of_birth) = MONTH(%(today)s)
		AND
			`status` = 'Active'
	""",
	"postgres": """
		SELECT "personal_email", "company", "company_email", "user_id", "employee_name" AS 'name', "image"
		FROM "tabEmployee"
		WHERE
			DATE_PART('day', "date_of_birth") = date_part('day', %(today)s)
		AND
			DATE_PART('month', "date_of_birth") = date_part('month', %(today)s)
		AND
			"status" = 'Active'
	""",
}, dict(today=today()), as_dict=1)

grouped_employees = defaultdict(lambda: [])

for employee_doc in employees_born_today:
	grouped_employees[employee_doc.get('company')].append(employee_doc)

return grouped_employees

Thanks in advance

1 Like

@Kunal_Mohite

hello,

Where is this code written. client side using custom script ?

Hey
@Chibuzor_Derrick the code is written in server side i.e. in employee.py file
Actually when I inspect the image than there is two path is fetching automatically with https and http request

1 Like