# HG changeset patch # User John Rouillard # Date 1554086201 14400 # Node ID 83037aaf3b9d50a44299f32b06dfb9c2deb6f021 # Parent eb51c0d9c9bf06a81a63283ba7bdbc16a1edcce6 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. diff -r eb51c0d9c9bf -r 83037aaf3b9d roundup/rest.py --- a/roundup/rest.py Sun Mar 31 21:46:23 2019 -0400 +++ b/roundup/rest.py Sun Mar 31 22:36:41 2019 -0400 @@ -327,6 +327,9 @@ __default_api_version = 1 __supported_api_versions = [ 1 ] + + api_version = None + def __init__(self, client, db): self.client = client self.db = db @@ -1450,7 +1453,6 @@ # parse Accept header and get the content type accept_header = parse_accept_header(headers.get('Accept')) accept_type = "invalid" - self.api_version = None for part in accept_header: if part[0] in self.__accepted_content_type: accept_type = self.__accepted_content_type[part[0]]