Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
250333e1
Commit
250333e1
authored
Jan 30, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs_appstore_base] Use edit to also update the modification date
Do not modify document history if nothing changed
parent
34057cae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
...rp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
+12
-3
No files found.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/Alarm_updateAppstoreWebSite.py
View file @
250333e1
import
json
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
preference_tool
=
portal
.
portal_preferences
...
...
@@ -39,6 +40,14 @@ for software_product in software_product_list:
"application_description_i18n"
:
"application.custom.%s.description"
%
app_domain
})
i
+=
1
portal
.
document_module
[
'store_officejs_data_application_sample_json'
].
setData
(
json
.
dumps
(
appstore_data
))
manifest_content
=
portal
.
web_page_module
[
'store_officejs_base_appcache'
].
getTextContent
()
portal
.
web_page_module
[
'store_officejs_appcache'
].
setTextContent
(
manifest_content
.
replace
(
'${logo_list}'
,
'
\
n
'
.
join
(
logo_url_list
)))
json_data
=
json
.
dumps
(
appstore_data
)
json_document
=
portal
.
document_module
[
'store_officejs_data_application_sample_json'
]
if
(
json_data
!=
json_document
.
getData
()):
# Do not modify document history with edit if nothing changed
json_document
.
edit
(
data
=
json
.
dumps
(
appstore_data
))
manifest_content
=
portal
.
web_page_module
[
'store_officejs_base_appcache'
].
getTextContent
()
# Ensure the appcache content is modified when the json is too
logo_url_list
.
append
(
'# %s'
%
DateTime
())
portal
.
web_page_module
[
'store_officejs_appcache'
].
edit
(
text_content
=
manifest_content
.
replace
(
'${logo_list}'
,
'
\
n
'
.
join
(
logo_url_list
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment