fix: sider issues
This commit is contained in:
parent
87b477a311
commit
d44f45c57b
@ -106,17 +106,18 @@ def get_project(name, template):
|
||||
|
||||
def make_project(args):
|
||||
args = frappe._dict(args)
|
||||
if args.project_template_name:
|
||||
template = make_project_template(args.project_template_name)
|
||||
|
||||
project = frappe.get_doc(dict(
|
||||
doctype = 'Project',
|
||||
project_name = args.project_name,
|
||||
status = 'Open',
|
||||
project_template = template.name,
|
||||
expected_start_date = args.start_date
|
||||
))
|
||||
|
||||
if args.project_template_name:
|
||||
template = make_project_template(args.project_template_name)
|
||||
project.project_template = template.name
|
||||
|
||||
if not frappe.db.exists("Project", args.project_name):
|
||||
project.insert()
|
||||
|
||||
|
@ -94,7 +94,7 @@ class Task(NestedSet):
|
||||
def update_depends_on(self):
|
||||
depends_on_tasks = self.depends_on_tasks or ""
|
||||
for d in self.depends_on:
|
||||
if d.task and not d.task in depends_on_tasks:
|
||||
if d.task and d.task not in depends_on_tasks:
|
||||
depends_on_tasks += d.task + ","
|
||||
self.depends_on_tasks = depends_on_tasks
|
||||
|
||||
@ -180,7 +180,7 @@ class Task(NestedSet):
|
||||
def populate_depends_on(self):
|
||||
if self.parent_task:
|
||||
parent = frappe.get_doc('Task', self.parent_task)
|
||||
if not self.name in [row.task for row in parent.depends_on]:
|
||||
if self.name not in [row.task for row in parent.depends_on]:
|
||||
parent.append("depends_on", {
|
||||
"doctype": "Task Depends On",
|
||||
"task": self.name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user