# Copyright (c) 2020, JINGROW and Contributors
# License: MIT. See LICENSE

import jingrow


def execute():
	jingrow.reload_pg("Email", "pagetype", "Notification")

	notifications = jingrow.get_all("Notification", {"is_standard": 1}, {"name", "channel"})
	for notification in notifications:
		if not notification.channel:
			jingrow.db.set_value("Notification", notification.name, "channel", "Email", update_modified=False)
			jingrow.db.commit()
