fix: Clear merge conflicts
- 'get_project_template' was removed a month back
- in 'make_project' insert the project directly as a check for it is there in the beginning.
diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py
index 715cdd9..d85c826 100644
--- a/erpnext/projects/doctype/project/test_project.py
+++ b/erpnext/projects/doctype/project/test_project.py
@@ -42,7 +42,7 @@
task2 = task_exists("Test Template Task Child 1")
if not task2:
task2 = create_task(subject="Test Template Task Child 1", parent_task=task1.name, is_template=1, begin=1, duration=3)
-
+
task3 = task_exists("Test Template Task Child 2")
if not task3:
task3 = create_task(subject="Test Template Task Child 2", parent_task=task1.name, is_template=1, begin=2, duration=3)
@@ -76,7 +76,7 @@
task2 = task_exists("Test Template Task with Dependency")
if not task2:
task2 = create_task(subject="Test Template Task with Dependency", depends_on=task1.name, is_template=1, begin=2, duration=2)
-
+
template = make_project_template("Test Project with Template - Dependent Tasks", [task1, task2])
project = get_project(project_name, template)
tasks = frappe.get_all('Task', ['subject','exp_end_date','depends_on_tasks', 'name'], dict(project=project.name), order_by='creation asc')
@@ -108,11 +108,6 @@
if args.project_name and frappe.db.exists("Project", {"project_name": args.project_name}):
return frappe.get_doc("Project", {"project_name": args.project_name})
- if args.project_template_name:
- template = make_project_template(args.project_template_name)
- else:
- template = get_project_template()
-
project = frappe.get_doc(dict(
doctype = 'Project',
project_name = args.project_name,
@@ -124,8 +119,7 @@
template = make_project_template(args.project_template_name)
project.project_template = template.name
- if not frappe.db.exists("Project", args.project_name):
- project.insert()
+ project.insert()
return project