# Copyright (c) 2022, Jingrow and Contributors
# License: MIT. See LICENSE


import jingrow
from jingrow.model import data_field_options


def execute():
	custom_field = jingrow.qb.PageType("Custom Field")
	(
		jingrow.qb.update(custom_field)
		.set(custom_field.options, None)
		.where((custom_field.fieldtype == "Data") & (custom_field.options.notin(data_field_options)))
	).run()
