Mercurial > p > roundup > code
changeset 5687:83037aaf3b9d
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.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 31 Mar 2019 22:36:41 -0400 |
| parents | eb51c0d9c9bf |
| children | 1b9ef04b9528 |
| files | roundup/rest.py |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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]]
