Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@wssheldon
Copy link
Contributor

No description provided.

@wssheldon wssheldon added the bug Something isn't working label Apr 11, 2023
@wssheldon wssheldon requested review from kevgliss and mvilanova April 11, 2023 23:54
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
@wssheldon wssheldon deleted the bugfix/engage branch April 11, 2023 23:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants