Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Roque
wendelin
Commits
59369322
Commit
59369322
authored
May 29, 2018
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reuse existing item for new analysis
parent
d681144c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
...al_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
+20
-10
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_createDataAnalysisList.py
View file @
59369322
...
@@ -105,20 +105,30 @@ for movement in portal_catalog(query):
...
@@ -105,20 +105,30 @@ for movement in portal_catalog(query):
# Except if it is a Data Array Line, then it is currently created by
# Except if it is a Data Array Line, then it is currently created by
# data operation itself (probably this exception is inconsistent)
# data operation itself (probably this exception is inconsistent)
if
item_type
not
in
aggregate_type_set
and
item_type
!=
"Data Array Line"
:
if
item_type
not
in
aggregate_type_set
and
item_type
!=
"Data Array Line"
:
module
=
portal
.
getDefaultModule
(
item_type
)
item
=
portal
.
portal_catalog
.
getResultValue
(
item
=
module
.
newContent
(
portal_type
=
item_type
,
portal_type
=
item_type
,
title
=
transformation
.
getTitle
(),
validation_state
=
"validated"
,
reference
=
"%s-%s"
%
(
transformation
.
getTitle
(),
item_variation_text
=
transformation_line
.
getVariationText
(),
delivery
.
getReference
()),
item_device_relative_url
=
movement
.
getAggregateDevice
(),
version
=
'001'
)
item_project_relative_url
=
data_analysis
.
getDestinationProject
(),
try
:
item_resource_uid
=
resource
.
getUid
(),
item
.
validate
()
item_source_relative_url
=
data_analysis
.
getSource
())
except
AttributeError
:
if
item
is
None
:
pass
module
=
portal
.
getDefaultModule
(
item_type
)
item
=
module
.
newContent
(
portal_type
=
item_type
,
title
=
transformation
.
getTitle
(),
reference
=
"%s-%s"
%
(
transformation
.
getTitle
(),
delivery
.
getReference
()),
version
=
'001'
)
try
:
item
.
validate
()
except
AttributeError
:
pass
aggregate_set
.
add
(
item
.
getRelativeUrl
())
aggregate_set
.
add
(
item
.
getRelativeUrl
())
# find other items such as device configuration and data configuration
# find other items such as device configuration and data configuration
# from data ingestion and data supply
# from data ingestion and data supply
composed
=
data_analysis
.
asComposedDocument
()
composed
=
data_analysis
.
asComposedDocument
()
data_analysis
.
checkConsistency
(
fixit
=
True
)
line_list
=
[
l
for
l
in
delivery
.
objectValues
(
portal_type
=
"Data Ingestion Line"
)]
line_list
=
[
l
for
l
in
delivery
.
objectValues
(
portal_type
=
"Data Ingestion Line"
)]
line_list
+=
[
l
for
l
in
composed
.
objectValues
(
portal_type
=
"Data Supply Line"
)]
line_list
+=
[
l
for
l
in
composed
.
objectValues
(
portal_type
=
"Data Supply Line"
)]
for
line
in
line_list
:
for
line
in
line_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