Skip to content

Commit

Permalink
fix: sla: cover only HD Ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad committed Oct 13, 2023
1 parent 9e2aee5 commit c6a2f4f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@


class HDServiceLevelAgreement(Document):
doctype_ticket = "HD Ticket"

def validate(self):
self.validate_priorities() # To refactor
self.validate_support_and_resolution() # To refactor
Expand Down Expand Up @@ -93,10 +95,12 @@ def validate_condition(self):
if not self.condition:
return
try:
temp_doc = frappe.new_doc(self.document_type)
temp_doc = frappe.new_doc(self.doctype_ticket)
frappe.safe_eval(self.condition, None, get_context(temp_doc))
except Exception as e:
frappe.throw(_("The Condition '{0}' is invalid: {1}").format(self.condition, str(e)))
frappe.throw(
_("The Condition '{0}' is invalid: {1}").format(self.condition, str(e))
)

# What?
def get_hd_service_level_agreement_priority(self, priority):
Expand Down

0 comments on commit c6a2f4f

Please sign in to comment.