Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
3c7edaa6c6d2
Commit
a18802f1
authored
Aug 01, 2009
by
Sylvain Thénault
Browse files
oops, should have been in a earlier commit (META_RELATION_TYPES renaming)
parent
1b9d08840a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema.py
View file @
3c7edaa6
...
...
@@ -38,7 +38,7 @@ PURE_VIRTUAL_RTYPES = set(('identity', 'has_text',))
VIRTUAL_RTYPES
=
set
((
'eid'
,
'identity'
,
'has_text'
,))
# set of meta-relations available for every entity types
META_R
ELATIONS_
TYPES
=
set
((
META_RTYPES
=
set
((
'owned_by'
,
'created_by'
,
'is'
,
'is_instance_of'
,
'identity'
,
'eid'
,
'creation_date'
,
'modification_date'
,
'has_text'
,
'cwuri'
,
))
...
...
@@ -245,7 +245,7 @@ class CubicWebEntitySchema(EntitySchema):
attribute defined in the entity schema
"""
for
rschema
,
_
in
self
.
attribute_definitions
():
if
not
(
rschema
in
META_R
ELATIONS_
TYPES
if
not
(
rschema
in
META_RTYPES
or
self
.
is_metadata
(
rschema
)):
return
rschema
...
...
@@ -328,7 +328,7 @@ class CubicWebRelationSchema(RelationSchema):
@
property
def
meta
(
self
):
return
self
.
type
in
META_R
ELATIONS_
TYPES
return
self
.
type
in
META_RTYPES
def
update
(
self
,
subjschema
,
objschema
,
rdef
):
super
(
CubicWebRelationSchema
,
self
).
update
(
subjschema
,
objschema
,
rdef
)
...
...
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