Matrix Integration #217

Merged
blacklight merged 30 commits from matrix-integration into master 2022-08-28 15:21:05 +02:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 0e3cabc5f6 - Show all commits

View File

@ -22,7 +22,9 @@ class StrippedString(fields.Function): # lgtm [py/missing-call-to-init]
class Function(fields.Function): # lgtm [py/missing-call-to-init]
def _get_attr(self, obj, attr: str):
def _get_attr(self, obj, attr: str, _recursive=True):
if self.attribute and _recursive:
return self._get_attr(obj, self.attribute, False)
if hasattr(obj, attr):
return getattr(obj, attr)
elif hasattr(obj, 'get'):