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
cubicweb
Commits
601ad29268ab
Commit
a19f97f7
authored
Apr 29, 2011
by
Nicolas Chauvat
Browse files
[entity] improve error message
--HG-- branch : oldstable
parent
a0d3ea01f4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
entity.py
View file @
601ad292
...
...
@@ -270,7 +270,7 @@ class Entity(AppObject):
role
=
'object'
else
:
role
=
'subject'
assert
eschema
.
has_relation
(
attr
,
role
)
assert
eschema
.
has_relation
(
attr
,
role
)
,
'%s %s not found on %s'
%
(
attr
,
role
,
eschema
)
rschema
=
eschema
.
subjrels
[
attr
]
if
role
==
'subject'
else
eschema
.
objrels
[
attr
]
if
not
rschema
.
final
and
isinstance
(
value
,
(
tuple
,
list
,
set
,
frozenset
)):
if
len
(
value
)
==
1
:
...
...
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