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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
d9e0fbda
Commit
d9e0fbda
authored
Jan 11, 2023
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: check jio_api_revision table check only content of the table
parent
fe065e12
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
27 deletions
+9
-27
bt5/erp5_api_style/PathTemplateItem/portal_alarms/jio_api_revision_check_consistency.xml
...Item/portal_alarms/jio_api_revision_check_consistency.xml
+3
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
.../Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
+6
-26
No files found.
bt5/erp5_api_style/PathTemplateItem/portal_alarms/jio_api_revision_check_consistency.xml
View file @
d9e0fbda
...
...
@@ -73,7 +73,9 @@
</item>
<item>
<key>
<string>
configuration_form_id
</string>
</key>
<value>
<string>
Alarm_viewConsistencyCheckConfiguration
</string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_jio_sql_revision/Alarm_activateCheckAndFixUnmatchingJIOAPIRevisionHash.py
View file @
d9e0fbda
if
not
context
.
Base_zCheckjIOAPIRevisionTableExists
():
context
.
Base_zCreatejIOAPIRevisionTable
()
kw
=
{}
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
if
context
.
getProperty
(
'incremental_check'
):
last_active_process
=
context
.
getLastActiveProcess
(
include_active
=
True
)
if
last_active_process
is
not
None
:
kw
[
'indexation_timestamp'
]
=
{
'query'
:
last_active_process
.
getStartDate
(),
'range'
:
'>='
}
active_process
=
context
.
newActiveProcess
().
getRelativeUrl
()
query_string
=
context
.
getProperty
(
'catalog_query_string'
,
''
)
# the query sould be something like "validation_state:!=deleted validation_state:!=draft portal_type:Organisation" etc
portal
=
context
.
getPortalObject
()
if
query_string
is
not
None
:
kw
.
update
(
SearchableText
=
query_string
)
parent_uid
=
[
portal
.
restrictedTraverse
(
module
).
getUid
()
for
module
in
context
.
getProperty
(
'module_list'
)
or
[]]
if
parent_uid
:
kw
.
update
(
parent_uid
=
parent_uid
)
portal
.
portal_catalog
.
searchAndActivate
(
context
.
getPortalObject
().
portal_catalog
.
searchAndActivate
(
method_id
=
'markUnmatchingJIOAPIrevisionHash'
,
activate_kw
=
{
'tag'
:
tag
,
'priority'
:
8
},
**
kw
)
query
=
SimpleQuery
(
comparison_operator
=
"!="
,
**
{
"jio_api_revision.revision"
:
None
}),
)
context
.
activate
(
after_tag
=
tag
).
getId
()
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