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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
9b21507f
Commit
9b21507f
authored
Sep 19, 2019
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accessor/Base.py: add exception for data type values
parent
99deec6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
product/ERP5Type/Accessor/Base.py
product/ERP5Type/Accessor/Base.py
+1
-1
No files found.
product/ERP5Type/Accessor/Base.py
View file @
9b21507f
...
@@ -92,7 +92,7 @@ class Setter(Method):
...
@@ -92,7 +92,7 @@ class Setter(Method):
# Modify the property
# Modify the property
if
value
in
self
.
_null
:
if
value
in
self
.
_null
:
setattr
(
instance
,
self
.
_storage_id
,
None
)
setattr
(
instance
,
self
.
_storage_id
,
None
)
elif
not
isinstance
(
value
,
builtin_type_tuple
):
elif
not
isinstance
(
value
,
builtin_type_tuple
)
and
self
.
_property_type
!=
'data'
:
raise
TypeError
(
'Class Objects can
\
'
t be used as property values'
)
raise
TypeError
(
'Class Objects can
\
'
t be used as property values'
)
elif
self
.
_property_type
==
'content'
:
elif
self
.
_property_type
==
'content'
:
# A file object should be provided
# A file object should be provided
...
...
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