Browse Source

use correct MultiDict class

Bastien Sevajol 6 years ago
parent
commit
a37c6e9398
1 changed files with 3 additions and 2 deletions
  1. 3 2
      hapic/ext/bottle/context.py

+ 3 - 2
hapic/ext/bottle/context.py View File

4
 from http import HTTPStatus
4
 from http import HTTPStatus
5
 
5
 
6
 import bottle
6
 import bottle
7
+from multidict import MultiDict
7
 
8
 
8
 from hapic.context import ContextInterface
9
 from hapic.context import ContextInterface
9
 from hapic.exception import OutputValidationException
10
 from hapic.exception import OutputValidationException
13
 class BottleContext(ContextInterface):
14
 class BottleContext(ContextInterface):
14
     def get_request_parameters(self, *args, **kwargs) -> RequestParameters:
15
     def get_request_parameters(self, *args, **kwargs) -> RequestParameters:
15
         path_parameters = dict(bottle.request.url_args)
16
         path_parameters = dict(bottle.request.url_args)
16
-        query_parameters = bottle.MultiDict(bottle.request.query.allitems())
17
+        query_parameters = MultiDict(bottle.request.query.allitems())
17
         body_parameters = dict(bottle.request.json or {})
18
         body_parameters = dict(bottle.request.json or {})
18
-        form_parameters = bottle.MultiDict(bottle.request.forms.allitems())
19
+        form_parameters = MultiDict(bottle.request.forms.allitems())
19
         header_parameters = dict(bottle.request.headers)
20
         header_parameters = dict(bottle.request.headers)
20
         files_parameters = dict(bottle.request.files)
21
         files_parameters = dict(bottle.request.files)
21
 
22