Skip to content

fix result not present in telegram api response#1929

Merged
KoalaSat merged 1 commit intoRoboSats:mainfrom
jerryfletcher21:telegram-watcher-check-result
May 14, 2025
Merged

fix result not present in telegram api response#1929
KoalaSat merged 1 commit intoRoboSats:mainfrom
jerryfletcher21:telegram-watcher-check-result

Conversation

@jerryfletcher21
Copy link
Contributor

@jerryfletcher21 jerryfletcher21 commented May 13, 2025

What does this PR do?

While running the coordinator I got:

File ".../api/management/commands/telegram_watcher.py", line 42, in handle
    if not response["result"]:
           ~~~~~~~~^^^^^^^^^^
KeyError: 'result'

This PR adds a check that "result" is present in response.
I think the check already present was meant for this case, but it checks if response["result"] is True/False.

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

@KoalaSat KoalaSat merged commit 7e1d69f into RoboSats:main May 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants