Skip to content

Commit 9864582

Browse files
authored
Update views.py (#14243)
1 parent 15b3c4c commit 9864582

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dojo/jira_link/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ def post(self, request):
345345
# Get the open and close keys
346346
msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
347347
try:
348+
open_key = close_key = None
348349
issue_id = jform.cleaned_data.get("issue_key")
349350
key_url = jira_server.strip("/") + "/rest/api/latest/issue/" + issue_id + "/transitions?expand=transitions.fields"
350351
response = jira._session.get(key_url).json()
351352
logger.debug("Retrieved JIRA issue successfully")
352-
open_key = close_key = None
353353
for node in response["transitions"]:
354354
if node["to"]["statusCategory"]["name"] == "To Do":
355355
open_key = open_key or int(node["id"])

0 commit comments

Comments
 (0)