From 5e445476f3ee418daf66e9663557f615fa3bada6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 3 Sep 2015 11:42:07 +0530 Subject: [PATCH] [fix] show doctype, fieldname in unique validation --- frappe/model/db_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/db_schema.py b/frappe/model/db_schema.py index eecb537604..02ddc78a0a 100644 --- a/frappe/model/db_schema.py +++ b/frappe/model/db_schema.py @@ -250,7 +250,7 @@ class DbTable: frappe.throw(str(e)) elif e.args[0]==1062: fieldname = str(e).split("'")[-2] - frappe.throw(_("{0} field cannot be set as unique, as there are non-unique existing values".format(fieldname))) + frappe.throw(_("{0} field cannot be set as unique in {1}, as there are non-unique existing values".format(fieldname, self.name))) else: raise e