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: ...@@ -6,31 +6,24 @@ if REQUEST is not None:
portal = context.getPortalObject() portal = context.getPortalObject()
# Intentionally use first, rather them later # Use only the first entry. This prevents change the rss content
# This prevents change the entry too often whenever # too often whenever multiple activities are failing over time.
# multiple activities are failing over and over message_list = portal.portal_activities.getMessageTempObjectList(processing_node=-2,
search_kw = { count=1)
'processing_node': -2, if not len(message_list):
#'order_by': (('date', 'ASC'),), return []
'count': 1
}
message_list = portal.portal_activities.getMessageTempObjectList(**search_kw) message = portal.Base_translateString('You have one or more activity failures.')
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
)]
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 @@ ...@@ -103,7 +103,7 @@
</item> </item>
<item> <item>
<key> <string>name</string> </key> <key> <string>name</string> </key>
<value> <string>ActivityTool_viewErrorActivityListAsRSS</string> </value> <value> <string>ERP5Site_viewPendingErrorListAsRSS</string> </value>
</item> </item>
<item> <item>
<key> <string>pt</string> </key> <key> <string>pt</string> </key>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Activities</string> </value> <value> <string>Pending Errors</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -101,10 +101,6 @@ ...@@ -101,10 +101,6 @@
<string>link</string> <string>link</string>
<string>link</string> <string>link</string>
</tuple> </tuple>
<tuple>
<string>description</string>
<string>description</string>
</tuple>
<tuple> <tuple>
<string>uid</string> <string>uid</string>
<string>guid</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