misc: use straight attribute as AttributeError parameter (#89777)

This commit is contained in:
Frédéric Péters 2024-04-20 19:40:33 +02:00
parent efd10a0564
commit 19454beb04
1 changed files with 1 additions and 1 deletions

View File

@ -664,7 +664,7 @@ class LazyFormDefObjectsManager:
if attribute == 'formdef':
warnings.warn('Deprecated access to formdef', DeprecationWarning)
return self._formdef
raise AttributeError('No such attribute %r' % attribute)
raise AttributeError(attribute)
def __len__(self):
if self._cached_resultset is not None: