Fix get_sender when using it on a ChannelForbidden (#3053)

Closes #3051.
This commit is contained in:
Julian Haupt 2021-05-09 15:33:01 +02:00 committed by GitHub
parent b2c26a53ef
commit 08a11eeacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ class SenderGetter(abc.ABC):
# in which case we want to force fetch the entire thing because
# the user explicitly called a method. If the user is okay with
# cached information, they may use the property instead.
if (self._sender is None or self._sender.min) \
if (self._sender is None or getattr(self._sender, 'min', None)) \
and await self.get_input_sender():
try:
self._sender =\