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.
This commit is contained in:
marination
2021-01-14 13:47:40 +05:30
parent 1ff7743d81
commit bc9eaac342

View File

@@ -108,11 +108,6 @@ def make_project(args):
if args.project_name and frappe.db.exists("Project", {"project_name": args.project_name}): if args.project_name and frappe.db.exists("Project", {"project_name": args.project_name}):
return frappe.get_doc("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( project = frappe.get_doc(dict(
doctype = 'Project', doctype = 'Project',
project_name = args.project_name, project_name = args.project_name,
@@ -124,8 +119,7 @@ def make_project(args):
template = make_project_template(args.project_template_name) template = make_project_template(args.project_template_name)
project.project_template = template.name project.project_template = template.name
if not frappe.db.exists("Project", args.project_name): project.insert()
project.insert()
return project return project