diff --git a/tcms/handlers.py b/tcms/handlers.py index 2ddc6b7248..5445976e44 100644 --- a/tcms/handlers.py +++ b/tcms/handlers.py @@ -3,7 +3,8 @@ from datetime import timedelta from modernrpc.handlers import JSONRPCHandler, XMLRPCHandler -from modernrpc.handlers.base import BaseResult, SuccessResult +from modernrpc.handlers.base import BaseResult +from modernrpc.handlers.xmlhandler import XmlSuccessResult from modernrpc.handlers.jsonhandler import JsonResult, JsonSuccessResult @@ -56,7 +57,7 @@ def escape_list(result_list): __class__.escape_dict(item) def dumps_result(self, result: BaseResult) -> str: - if isinstance(result, SuccessResult): + if isinstance(result, XmlSuccessResult): if isinstance(result.data, timedelta): result.data = result.data.total_seconds() elif isinstance(result.data, dict):