Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the engage-oncall command when page checkbox is not selected #3262

Merged
merged 1 commit into from Apr 11, 2023

Conversation

wssheldon
Copy link
Contributor

No description provided.

@wssheldon wssheldon added the bug Something isn't working label Apr 11, 2023
ack_engage_oncall_submission_event(ack=ack)
oncall_service_external_id = form_data[EngageOncallBlockIds.service]["value"]
page = form_data.get(EngageOncallBlockIds.page, {"value": None})[0]["value"]
page_block = form_data.get(EngageOncallBlockIds.page)
page = page_block[0]["value"] if page_block else None # page_block[0]["value"] == "Yes"
Copy link
Contributor Author

@wssheldon wssheldon Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more readable in my opinion but then the value that's passed is unnecessary * shrug *

Suggested change
page = page_block[0]["value"] if page_block else None # page_block[0]["value"] == "Yes"
page = "Yes" if form_data.get(EngageOncallBlockIds.page) else None

@wssheldon wssheldon merged commit 326c858 into master Apr 11, 2023
9 checks passed
@wssheldon wssheldon deleted the bugfix/engage branch April 11, 2023 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant