From 186507f2221d1a7598259cd8d5134b9c07620dfd Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Mon, 27 Nov 2023 18:29:58 -0500 Subject: [PATCH] backends quick fix for case where owner not org member this will need to be fixed correctly so that the lookup only needs to be done once and possibly switch to use something more comprehensive than members which seems like it will break given how they are planning to implement external users ... need a "members + external" or something otherwise this will be a mess --- sparcur/backends.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sparcur/backends.py b/sparcur/backends.py index 2b48e139..98202bd2 100644 --- a/sparcur/backends.py +++ b/sparcur/backends.py @@ -719,6 +719,10 @@ def name_or_email(self): oid = self.owner_id if oid in self._member_cache: return self._member_cache[oid] + else: + msg = f'owner no longer a member of organization? {self.owner_id}' + log.warning(msg) + return User(self.bfobject.owner()) @property def parent(self):