Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

docs(samples): Update previous month logic to avoid zero-index bug in webhook_prebuilt_telecom sample #479

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

nicain
Copy link
Contributor

@nicain nicain commented Jan 6, 2023

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@nicain nicain requested review from a team as code owners January 6, 2023 20:46
@nicain nicain requested a review from engelke January 6, 2023 20:46
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: dialogflow Issues related to the googleapis/python-dialogflow-cx API. labels Jan 6, 2023
@nicain nicain changed the title fix: Update previous month logic to avoid zer-index bug fix: Update previous month logic to avoid zero-index bug Jan 6, 2023
@nicain nicain requested a review from parthea January 6, 2023 20:46
@parthea parthea changed the title fix: Update previous month logic to avoid zero-index bug docs(samples): Update previous month logic to avoid zero-index bug in webhook_prebuilt_telecom sample Jan 6, 2023
@nicain nicain force-pushed the fix/478 branch 2 times, most recently from 0907553 to ed8871b Compare January 6, 2023 21:04
today = date.today()
assert res["sessionInfo"]["parameters"]["anomaly_detect"] == "false"
assert res["sessionInfo"]["parameters"]["total_bill"] == 1054.34
assert res["sessionInfo"]["parameters"]["first_month"] == str(
today.replace(day=1, month=(today.month - 1))
today.replace(day=1, month=1 + ((today.month - 2) % 12))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

XREF

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: dialogflow Issues related to the googleapis/python-dialogflow-cx API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants