Update frappe/automation/doctype/assignment_rule/assignment_rule.py

Co-Authored-By: Shivam Mishra <scmmishra@users.noreply.github.com>
This commit is contained in:
Himanshu 2019-10-02 23:53:13 +05:30 committed by GitHub
parent 87b6b71f44
commit 09b8750d47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,7 @@ class AssignmentRule(Document):
return False
def get_assignment_days(self):
return [d.day for d in self.assignment_days]
return [d.day for d in self.get('assignment_days', [])]
def is_rule_not_applicable_today(self):
today = frappe.flags.assignment_day or frappe.utils.get_weekday()
@ -245,4 +245,4 @@ def get_repeated(values):
else:
if value not in diff:
diff.append(str(value))
return " ".join(diff)
return " ".join(diff)