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
cubes
jsonschema
Commits
0ec8ffbeb8f8
Commit
221c0723
authored
Dec 13, 2018
by
Philippe Pepiot
Browse files
Fix NoWildcardAcceptPredicate compat with pyramid 1.10
self.val has been renamed to self.values
parent
935f90e015be
Changes
2
Hide whitespace changes
Inline
Side-by-side
cubicweb_jsonschema/__pkginfo__.py
View file @
0ec8ffbe
...
...
@@ -18,7 +18,7 @@ __depends__ = {
'cubicweb[pyramid]'
:
'>= 3.24.1'
,
'six'
:
'>= 1.4.0'
,
'iso8601'
:
None
,
'pyramid'
:
'>= 1.
8
.0'
,
'pyramid'
:
'>= 1.
10
.0'
,
}
__recommends__
=
{}
...
...
cubicweb_jsonschema/predicates.py
View file @
0ec8ffbe
...
...
@@ -32,7 +32,7 @@ class NoWildcardAcceptPredicate(predicates.AcceptPredicate):
def
__call__
(
self
,
context
,
request
):
request_accepts
=
[
h
for
h
in
request
.
accept
if
h
!=
'*/*'
]
for
accept_type
in
self
.
val
:
for
accept_type
in
self
.
val
ues
:
if
accept_type
in
request_accepts
:
return
True
return
False
...
...
Philippe Pepiot
@ppepiot
mentioned in commit
5182ff4293ee
·
Jan 14, 2021
mentioned in commit
5182ff4293ee
mentioned in commit 7f77e23fcbe03c9131a1e9d70a1e8733b5d884d6
Toggle commit list
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