Fix BrickRecordFields failing on KeyError instead of AttributeError when used with hasattr()
This commit is contained in:
parent
798226932f
commit
b73bd6e99d
@ -4,6 +4,9 @@ from typing import Any
|
||||
# SQLite record fields
|
||||
class BrickRecordFields(object):
|
||||
def __getattr__(self, name: str, /) -> Any:
|
||||
if name not in self.__dict__:
|
||||
raise AttributeError(name)
|
||||
|
||||
return self.__dict__[name]
|
||||
|
||||
def __setattr__(self, name: str, value: Any, /) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user