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
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
alecs_myu
erp5
Commits
c8d3714f
Commit
c8d3714f
authored
Mar 01, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get(..., None) on a dict() is useless as get() returns None if the key cannot be found.
parent
7d39f342
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
product/ERP5Security/ERP5UserFactory.py
product/ERP5Security/ERP5UserFactory.py
+1
-1
product/ERP5Type/dynamic/component_package.py
product/ERP5Type/dynamic/component_package.py
+1
-1
product/ERP5Type/dynamic/portal_type_class.py
product/ERP5Type/dynamic/portal_type_class.py
+1
-1
product/ERP5Type/mixin/component.py
product/ERP5Type/mixin/component.py
+1
-1
product/ERP5Type/patches/PropertiedUser.py
product/ERP5Type/patches/PropertiedUser.py
+1
-1
product/ERP5Type/patches/User.py
product/ERP5Type/patches/User.py
+2
-2
No files found.
product/ERP5Security/ERP5UserFactory.py
View file @
c8d3714f
...
...
@@ -115,7 +115,7 @@ class ERP5User(PropertiedUser):
object_roles
.
remove
(
'Developer'
)
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
:
config
=
product_config
.
get
(
'erp5'
,
None
)
config
=
product_config
.
get
(
'erp5'
)
if
config
and
self
.
getId
()
in
config
.
developer_list
:
return
1
...
...
product/ERP5Type/dynamic/component_package.py
View file @
c8d3714f
...
...
@@ -209,7 +209,7 @@ class ComponentDynamicPackage(ModuleType):
return
None
for
version
in
site
.
getVersionPriorityList
():
component
=
component_version_dict
.
get
(
version
,
None
)
component
=
component_version_dict
.
get
(
version
)
if
component
is
not
None
:
break
else
:
...
...
product/ERP5Type/dynamic/portal_type_class.py
View file @
c8d3714f
...
...
@@ -202,7 +202,7 @@ def generatePortalTypeClass(site, portal_type_name):
pass
if
klass
is
None
:
type_class_path
=
document_class_registry
.
get
(
type_class
,
None
)
type_class_path
=
document_class_registry
.
get
(
type_class
)
if
type_class_path
is
None
:
raise
AttributeError
(
'Document class %s has not been registered:'
' cannot import it as base of Portal Type %s'
...
...
product/ERP5Type/mixin/component.py
View file @
c8d3714f
...
...
@@ -292,7 +292,7 @@ class ComponentMixin(PropertyRecordableMixin, Base):
self
.
dav__init
(
REQUEST
,
RESPONSE
)
self
.
dav__simpleifhandler
(
REQUEST
,
RESPONSE
,
refresh
=
1
)
text_content
=
REQUEST
.
get
(
'BODY'
,
None
)
text_content
=
REQUEST
.
get
(
'BODY'
)
if
text_content
is
None
:
RESPONSE
.
setStatus
(
304
)
else
:
...
...
product/ERP5Type/patches/PropertiedUser.py
View file @
c8d3714f
...
...
@@ -116,7 +116,7 @@ def allowed(self, object, object_roles=None ):
object_roles
.
remove
(
'Developer'
)
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
:
config
=
product_config
.
get
(
'erp5'
,
None
)
config
=
product_config
.
get
(
'erp5'
)
if
config
and
self
.
getId
()
in
config
.
developer_list
:
return
1
...
...
product/ERP5Type/patches/User.py
View file @
c8d3714f
...
...
@@ -29,7 +29,7 @@ def allowed(self, object, object_roles=None):
object_roles
.
remove
(
'Developer'
)
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
:
config
=
product_config
.
get
(
'erp5'
,
None
)
config
=
product_config
.
get
(
'erp5'
)
if
config
and
self
.
getId
()
in
config
.
developer_list
:
return
1
...
...
@@ -50,7 +50,7 @@ def getRoles(self):
if
role_tuple
:
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
:
config
=
product_config
.
get
(
'erp5'
,
None
)
config
=
product_config
.
get
(
'erp5'
)
if
config
:
role_set
=
set
(
role_tuple
)
user_id
=
self
.
getId
()
...
...
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