sender.min is not set for ChannelForbidden, so use getattr for accessing it (#3051)

This commit is contained in:
Julian Haupt 2021-05-09 11:16:56 +02:00
parent b2c26a53ef
commit 0425bdb7bf

View File

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