From c8f0c25088f1d8f936a3f25b884d4e4d4179c777 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 23 Apr 2015 18:49:11 +0530 Subject: [PATCH] referenceError name changed to circularReferenceError --- erpnext/projects/doctype/task/task.py | 4 ++-- erpnext/projects/doctype/task/test_task.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 6b16f02cce..2a7aedc382 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -9,7 +9,7 @@ from frappe import _ from frappe.model.document import Document -class ReferenceError(frappe.ValidationError): pass +class CircularReferenceError(frappe.ValidationError): pass class Task(Document): def get_feed(self): @@ -82,7 +82,7 @@ class Task(Document): def check_recursion(self, task, task_list): if task in task_list: - frappe.throw("Circular Reference Error", ReferenceError) + frappe.throw("Circular Reference Error", CircularReferenceError) else : task_list.append(task) return frappe.db.get_value("Task", task, "depends_on") diff --git a/erpnext/projects/doctype/task/test_task.py b/erpnext/projects/doctype/task/test_task.py index f1038b47f4..30a64f26c2 100644 --- a/erpnext/projects/doctype/task/test_task.py +++ b/erpnext/projects/doctype/task/test_task.py @@ -7,7 +7,7 @@ from frappe.utils import getdate test_records = frappe.get_test_records('Task') -from erpnext.projects.doctype.task.task import ReferenceError +from erpnext.projects.doctype.task.task import CircularReferenceError class TestTask(unittest.TestCase): def test_circular_refereence(self): @@ -37,7 +37,7 @@ class TestTask(unittest.TestCase): task1.update({ "depends_on": task3.name }) - self.assertRaises(ReferenceError, task1.save) + self.assertRaises(CircularReferenceError, task1.save) def test_reschedule_depending_task(self): task1 = frappe.new_doc('Task')