Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
97b5e52a
Commit
97b5e52a
authored
9 years ago
by
Jeremy Kersten
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] base: override default int converter from werkzeug
This reverts commit
c01c10c4
.
parent
e0297244
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openerp/addons/base/ir/ir_http.py
+1
-15
1 addition, 15 deletions
openerp/addons/base/ir/ir_http.py
with
1 addition
and
15 deletions
openerp/addons/base/ir/ir_http.py
+
1
−
15
View file @
97b5e52a
...
...
@@ -54,26 +54,12 @@ class ModelsConverter(werkzeug.routing.BaseConverter):
def
to_url
(
self
,
value
):
return
"
,
"
.
join
(
i
.
id
for
i
in
value
)
class
SignedIntConverter
(
werkzeug
.
routing
.
BaseConverter
):
def
__init__
(
self
,
url_map
):
super
(
SignedIntConverter
,
self
).
__init__
(
url_map
)
def
to_python
(
self
,
value
):
try
:
return
int
(
value
)
except
ValueError
:
raise
werkzeug
.
routing
.
ValidationError
()
def
to_url
(
self
,
value
):
return
value
class
ir_http
(
osv
.
AbstractModel
):
_name
=
'
ir.http
'
_description
=
"
HTTP routing
"
def
_get_converters
(
self
):
return
{
'
model
'
:
ModelConverter
,
'
models
'
:
ModelsConverter
,
'
int
'
:
SignedIntConverter
}
return
{
'
model
'
:
ModelConverter
,
'
models
'
:
ModelsConverter
}
def
_find_handler
(
self
,
return_rule
=
False
):
return
self
.
routing_map
().
bind_to_environ
(
request
.
httprequest
.
environ
).
match
(
return_rule
=
return_rule
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment