Skip to content

Commit 44f3cc8

Browse files
committed
Merge branch 'fix_objectid_validation'
2 parents 25d87d2 + 403b85a commit 44f3cc8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

eve/io/mongo/validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _validate_data_relation(self, data_relation, field, value):
164164
data_resource, data_relation['field']))
165165

166166
def _validate_type_objectid(self, value):
167-
if isinstance(value, ObjectId):
167+
if ObjectId.is_valid(value):
168168
return True
169169

170170
def _validate_type_decimal(self, value):

tox.ini

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[tox]
2-
envlist=py26,py27,py33,py34,py35,py36,pypy,flake8
2+
envlist=py26,py27,py33,py34,py35,py36,pypy
33

44
[testenv]
55
commands=python setup.py test {posargs}
66

77
[testenv:flake8]
88
deps=flake8
9-
basepython=python2
10-
commands=flake8 --ignore=E731,E722 eve {posargs}
9+
basepython=python3
10+
commands=flake8 --ignore=E731,E722,F821 eve {posargs}
1111

1212
[tox:travis]
1313
2.6 = py26
1414
2.7 = py27
1515
3.3 = py33
1616
3.4 = py34
17-
3.5 = py35
17+
3.5 = py35, flake8
1818
3.6 = py36
1919
pypy = pypy
20-
flake8 = flake8

0 commit comments

Comments
 (0)