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

Fix media in MockMessageManager #422

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Conversation

MoxForever
Copy link
Contributor

Fix error in MockMessageManage when testing window with StaticMedia

from aiogram_dialog.api.protocols import (
MessageManagerProtocol, MessageNotModified,
)


def file_id(media: MediaAttachment) -> str:
return media.file_id or str(uuid4())
return media.file_id.file_id or str(uuid4())
Copy link
Owner

Choose a reason for hiding this comment

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

It will fail if media.file_id is None

@Tishka17 Tishka17 merged commit b497d5d into Tishka17:develop Aug 23, 2024
5 checks 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