Commit 26f40b27 authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: update Base_getSupportRequestInProgress usage

parent a255ce35
from DateTime import DateTime
portal = context.getPortalObject()
if context.getMonitorScope() == "disabled" or \
if (context.getMonitorScope() == "disabled") or \
portal.ERP5Site_isSupportRequestCreationClosed():
return
return
software_installation_list = portal.portal_catalog(
portal_type='Software Installation',
......@@ -48,9 +48,8 @@ for software_installation in software_installation_list:
if should_notify:
support_request = person.Base_getSupportRequestInProgress(
title=ticket_title,
aggregate=context.getRelativeUrl())
support_request = context.Base_getSupportRequestInProgress(
title=ticket_title)
if support_request is None:
person.notify(support_request_title=ticket_title,
......
from DateTime import DateTime
portal = context.getPortalObject()
if context.getMonitorScope() == "disabled" or \
if (context.getMonitorScope() == "disabled") or \
portal.ERP5Site_isSupportRequestCreationClosed():
return
......@@ -51,7 +51,7 @@ if not should_notify:
if compute_partition_uid_list:
instance_list = portal.portal_catalog(
portal_type='Software Instance',
default_aggregate_uid=compute_partition_uid_list)
aggregate__uid=compute_partition_uid_list)
if instance_list:
should_notify = True
......@@ -73,14 +73,12 @@ if not should_notify:
context.getTitle(), context.getReference(), last_contact)
if should_notify:
support_request = person.Base_getSupportRequestInProgress(
title=node_ticket_title,
aggregate=context.getRelativeUrl())
support_request = context.Base_getSupportRequestInProgress(
title=node_ticket_title)
if support_request is None:
support_request = person.Base_getSupportRequestInProgress(
title=ticket_title,
aggregate=context.getRelativeUrl())
support_request = context.Base_getSupportRequestInProgress(
title=ticket_title)
if support_request is None:
person.notify(support_request_title=ticket_title,
......
......@@ -16,9 +16,8 @@ if error_message:
else:
error_message = "No message!"
support_request = person.Base_getSupportRequestInProgress(
title=ticket_title,
aggregate=context.getRelativeUrl())
support_request = context.Base_getSupportRequestInProgress(
title=ticket_title)
if support_request is None:
person.notify(support_request_title=ticket_title,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment