From 5a0099ec5f6f2ca2f1383b70325bd528817cd061 Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Mon, 10 Oct 2011 13:47:58 +0200 Subject: Nitrate: Correctly handle when case run sortkey is None --- Nitrate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Nitrate.py b/Nitrate.py index aa5107e..63414e9 100644 --- a/Nitrate.py +++ b/Nitrate.py @@ -2742,7 +2742,10 @@ class CaseRun(Mutable): self._assignee = User(caserunhash["assignee_id"]) self._build = Build(caserunhash["build_id"]) self._notes = caserunhash["notes"] - self._sortkey = int(caserunhash["sortkey"]) + if caserunhash["sortkey"] is not None: + self._sortkey = int(caserunhash["sortkey"]) + else: + self._sortkey = None self._status = Status(caserunhash["case_run_status_id"]) self._testrun = TestRun(caserunhash["run_id"]) if testcasehash: -- cgit