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

[BUG] PostgresPersistence does not correcly load data from database. #108

Open
2ale2 opened this issue May 25, 2024 · 0 comments
Open

[BUG] PostgresPersistence does not correcly load data from database. #108

2ale2 opened this issue May 25, 2024 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@2ale2
Copy link

2ale2 commented May 25, 2024

Module this issue is about

ptbcontrib/postgres_persistence/postgrespersistence.py

Steps to reproduce

  1. Use specified module as persistence class.

  2. Build your application loading the persistence.

  3. Add some random data inside bot_data, as it is the only one usable before getting updates.

  4. Generate an update so the persistence is updated in the database.

  5. Restart the bot script.

Expected behaviour

Added data (step 3) should be correctly loaded from database, so *_data dictionaries should contain the same information they had before restarting bot script.

Actual behaviour

Even if database is actually updated, *_dict are empty, so persistence is not restored correctly.

Configuration

Operating System:
Distributor ID: Linuxmint
Release: 21.3

Version of Python, python-telegram-bot & dependencies:
Python 3.12
PTB 21.2

Please Note

This is the first time I'm trying to contribute, so sorry if something is not clear enough.

@2ale2 2ale2 added the bug 🐛 Something isn't working label May 25, 2024
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

No branches or pull requests

1 participant