jira: Fix handling of sprint_started events.

Now that we inspect more attributes of events in determining subjects,
we need to filter events like sprint_started before fetching the subject.
This commit is contained in:
Tim Abbott 2020-03-26 16:34:02 -07:00
parent 0308ded874
commit d52a891858
1 changed files with 2 additions and 2 deletions

View File

@ -316,11 +316,11 @@ def api_jira_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, Any]=REQ(argument_type='body')) -> HttpResponse: payload: Dict[str, Any]=REQ(argument_type='body')) -> HttpResponse:
event = get_event_type(payload) event = get_event_type(payload)
subject = get_issue_subject(payload)
if event in IGNORED_EVENTS: if event in IGNORED_EVENTS:
return json_success() return json_success()
subject = get_issue_subject(payload)
content_func = get_event_handler(event) content_func = get_event_handler(event)
if content_func is None: if content_func is None: