import xhiveframework


def execute():
	Offer = xhiveframework.qb.DocType("Job Offer")
	Applicant = xhiveframework.qb.DocType("Job Applicant")

	(
		xhiveframework.qb.update(Offer)
		.inner_join(Applicant)
		.on(Applicant.name == Offer.job_applicant)
		.set(Offer.applicant_email, Applicant.email_id)
		.where(Offer.applicant_email.isnull())
	).run()
