def validate(self):
		meta = frappe.get_meta(self.dt)
		fieldnames = [df.fieldname for df in meta.get("fields")]

		if self.insert_after and fieldnames in self.insert_after:
			self.idx = fieldnames.index(self.insert_after) + 1

		if not self.idx:
			self.idx = len(fieldnames) + 1

		if not self.fieldname:
			frappe.throw(_("Fieldname not set for Custom Field"))
dataset/ETHPy150Open frappe/frappe/frappe/custom/doctype/custom_field/custom_field.py/CustomField.validate/swapped operands of `in`