We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69d32b9 commit 539a5afCopy full SHA for 539a5af
tcms_api/plugin_helpers.py
@@ -135,10 +135,18 @@ def get_status_id_fallback(self, name):
135
:type name: str
136
:rtype: int
137
"""
138
+ lookup_condition = None
139
+
140
if name in ["PASSED", "WAIVED"]:
141
lookup_condition = "weight__gt"
142
elif name in ["FAILED", "ERROR"]:
143
lookup_condition = "weight__lt"
144
145
+ if not lookup_condition:
146
+ raise RuntimeError(
147
+ f"`lookup_condition`is not initialized when searching for {name}. "
148
+ "Please report a bug at https://github.com/kiwitcms/tcms-api/issues/new"
149
+ )
150
return self.get_statuses_by_weight({lookup_condition: 0})[0]["id"]
151
152
def get_status_id(self, name):
0 commit comments