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


import xhiveframework
from xhiveframework.model import data_field_options


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