|
|
@@ -273,7 +273,7 @@ def validate_fields(meta): |
|
|
|
frappe.throw(_("Precision should be between 1 and 6")) |
|
|
|
|
|
|
|
def check_unique_and_text(d): |
|
|
|
if d.unique and d.fieldtype in ("Text", "Long Text", "Small Text", "Code", "Text Editor"): |
|
|
|
if getattr(d, "unique", False) and d.fieldtype in ("Text", "Long Text", "Small Text", "Code", "Text Editor"): |
|
|
|
frappe.throw(_("Fieldtype {0} for {1} cannot be unique").format(d.fieldtype, d.label)) |
|
|
|
|
|
|
|
if d.search_index and d.fieldtype in ("Text", "Long Text", "Small Text", "Code", "Text Editor"): |
|
|
|