Mercurial > p > roundup > code
changeset 5589:5a2de4c19109 REST-rebased
Fix an indentation bug
committer: Ralf Schlatterbeck <rsc@runtux.com>
| author | Chau Nguyen <dangchau1991@yahoo.com> |
|---|---|
| date | Wed, 30 Jan 2019 10:26:35 +0100 |
| parents | 6b3a9655a7d9 |
| children | 4d8746c73fdb |
| files | roundup/rest.py |
| diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/rest.py Wed Jan 30 10:26:35 2019 +0100 +++ b/roundup/rest.py Wed Jan 30 10:26:35 2019 +0100 @@ -796,16 +796,16 @@ self, "%s_element" % method.lower() )(class_name, item_id, input) - if format_output.lower() == "json": - self.client.setHeader("Content-Type", "application/json") - if pretty_output: - indent = 4 - else: - indent = None - output = RoundupJSONEncoder(indent=indent).encode(output) + if format_output.lower() == "json": + self.client.setHeader("Content-Type", "application/json") + if pretty_output: + indent = 4 else: - self.client.response_code = 406 - output = "Content type is not accepted by client" + indent = None + output = RoundupJSONEncoder(indent=indent).encode(output) + else: + self.client.response_code = 406 + output = "Content type is not accepted by client" return output
