Skip to content

Commit 7e13bd9

Browse files
committed
trafaret compatibility fixes
1 parent bd6081b commit 7e13bd9

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

aiohttp_admin/backends/mongo_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,4 @@ def create_validator(schema, primary_key):
123123
# create validator without primary key, used for update queries
124124
# where pk supplied in url and rest in body
125125
keys = [s for s in schema.keys if s.get_name() != primary_key]
126-
new_schema = t.Dict({})
127-
new_schema.keys = keys
128-
return new_schema.ignore_extra(primary_key)
126+
return t.Dict().merge(keys).ignore_extra(primary_key)

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ pytest-sugar==0.9.2
1414
pytest==4.2.0
1515
python-dateutil==2.8.0
1616
sqlalchemy==1.2.17
17-
trafaret==2.0.0a1
17+
trafaret==1.2.0
1818
pymysql==0.9.3
1919
-r requirements-doc.txt

0 commit comments

Comments
 (0)