Skip to content

Commit a40108e

Browse files
committed
Move definition/initialization of api_version into the class and out
of dispatch. Tests were failing because of this since the tests don't all run through dispatch.
1 parent 47f6c88 commit a40108e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/rest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ class RestfulInstance(object):
327327
__default_api_version = 1
328328
__supported_api_versions = [ 1 ]
329329

330+
331+
api_version = None
332+
330333
def __init__(self, client, db):
331334
self.client = client
332335
self.db = db
@@ -1450,7 +1453,6 @@ def dispatch(self, method, uri, input):
14501453
# parse Accept header and get the content type
14511454
accept_header = parse_accept_header(headers.get('Accept'))
14521455
accept_type = "invalid"
1453-
self.api_version = None
14541456
for part in accept_header:
14551457
if part[0] in self.__accepted_content_type:
14561458
accept_type = self.__accepted_content_type[part[0]]

0 commit comments

Comments
 (0)