Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
dataprocessing
Commits
1ed366186ae4
Commit
dd9516a9
authored
Feb 03, 2016
by
Denis Laxalde
Browse files
[schema] Add a constraint on process_input_file preventing usage of script's file
parent
d4418e91bd9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
migration/0.2.0_Any.py
View file @
1ed36618
...
...
@@ -42,5 +42,5 @@ add_relation_type('process_stderr')
sync_schema_props_perms
(
'DataTransformationProcess'
)
sync_schema_props_perms
(
'DataValidationProcess'
)
sync_schema_props_perms
(
'process_input_file'
,
syncprops
=
False
)
sync_schema_props_perms
(
'process_input_file'
)
sync_schema_props_perms
(
'File'
,
syncprops
=
False
)
schema.py
View file @
1ed36618
...
...
@@ -20,7 +20,7 @@ from yams.buildobjs import (ComputedRelation, EntityType, RelationDefinition,
Int
,
String
)
from
cubicweb.schema
import
(
RRQLExpression
,
ERQLExpression
,
WorkflowableEntityType
)
RQLConstraint
,
WorkflowableEntityType
)
from
cubes.file.schema
import
File
...
...
@@ -70,6 +70,10 @@ class process_input_file(RelationDefinition):
object
=
'File'
cardinality
=
'?*'
description
=
_
(
'input file of the data process'
)
constraints
=
[
RQLConstraint
(
'NOT EXISTS(SC implemented_by O)'
,
msg
=
_
(
'file is used by a script'
)),
]
class
validated_by
(
RelationDefinition
):
...
...
Write
Preview
Supports
Markdown
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