Commit db2b7e4b authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_administration: Update a bit

parent 7e49f997
Pipeline #39246 failed with stage
in 0 seconds
......@@ -6,31 +6,24 @@ if REQUEST is not None:
portal = context.getPortalObject()
# Intentionally use first, rather them later
# This prevents change the entry too often whenever
# multiple activities are failing over and over
search_kw = {
'processing_node': -2,
#'order_by': (('date', 'ASC'),),
'count': 1
}
# Use only the first entry. This prevents change the rss content
# too often whenever multiple activities are failing over time.
message_list = portal.portal_activities.getMessageTempObjectList(processing_node=-2,
count=1)
if not len(message_list):
return []
message_list = portal.portal_activities.getMessageTempObjectList(**search_kw)
if len(message_list):
activity_entry = message_list[0]
message = context.Base_translateString('You have one or more activity failures.')
# Be nice with renderjs_runner
web_site = context.getWebSiteValue()
if web_site is None:
web_site_url = portal.absolute_url()
else:
web_site_url = web_site.absolute_url() + "/#"
return [
newTempBase(portal, "_",
uid=activity_entry.uid,
date=DateTime().earliestTime(),
link="%s/portal_activities" % web_site_url,
title=message
)]
message = portal.Base_translateString('You have one or more activity failures.')
return []
# Make compatible with renderjs_runner
web_site = context.getWebSiteValue()
if web_site is None:
web_site_url = portal.absolute_url()
else:
web_site_url = web_site.absolute_url() + "/#"
return [
newTempBase(portal, "rss_entry",
uid=message_list[0].uid,
date=DateTime().earliestTime(),
link="%s/portal_activities" % web_site_url,
title=message)]
......@@ -103,7 +103,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ActivityTool_viewErrorActivityListAsRSS</string> </value>
<value> <string>ERP5Site_viewPendingErrorListAsRSS</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -119,7 +119,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Activities</string> </value>
<value> <string>Pending Errors</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -101,10 +101,6 @@
<string>link</string>
<string>link</string>
</tuple>
<tuple>
<string>description</string>
<string>description</string>
</tuple>
<tuple>
<string>uid</string>
<string>guid</string>
......
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