Commit 55f2e983 authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: source_administration is not used anymore on Compute Node

parent 603e9a53
from DateTime import DateTime from DateTime import DateTime
portal = context.getPortalObject() portal = context.getPortalObject()
person = context.getSourceAdministrationValue(portal_type="Person") if context.getMonitorScope() == "disabled" or \
if not person or \
context.getMonitorScope() == "disabled" or \
portal.ERP5Site_isSupportRequestCreationClosed(): portal.ERP5Site_isSupportRequestCreationClosed():
return return
...@@ -49,20 +47,21 @@ for software_installation in software_installation_list: ...@@ -49,20 +47,21 @@ for software_installation in software_installation_list:
(software_installation.getUrlString(), compute_node_title, software_installation.getCreationDate()) (software_installation.getUrlString(), compute_node_title, software_installation.getCreationDate())
if should_notify: if should_notify:
support_request = person.Base_getSupportRequestInProgress(
title=ticket_title,
aggregate=software_installation.getRelativeUrl())
if support_request is None: support_request = person.Base_getSupportRequestInProgress(
person.notify(support_request_title=ticket_title, title=ticket_title,
support_request_description=description, aggregate=context.getRelativeUrl())
aggregate=software_installation.getRelativeUrl())
if support_request is None:
support_request_relative_url = context.REQUEST.get("support_request_relative_url") person.notify(support_request_title=ticket_title,
if support_request_relative_url is None: support_request_description=description,
return aggregate=context.getRelativeUrl())
support_request = portal.restrictedTraverse(support_request_relative_url) support_request_relative_url = context.REQUEST.get("support_request_relative_url")
if support_request_relative_url is None:
return
support_request = portal.restrictedTraverse(support_request_relative_url)
if support_request is None: if support_request is None:
return return
......
from DateTime import DateTime from DateTime import DateTime
portal = context.getPortalObject() portal = context.getPortalObject()
person = context.getSourceAdministrationValue(portal_type="Person") if context.getMonitorScope() == "disabled" or \
if not person or \
context.getMonitorScope() == "disabled" or \
portal.ERP5Site_isSupportRequestCreationClosed(): portal.ERP5Site_isSupportRequestCreationClosed():
return return
......
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