Skip to content

Commit

Permalink
backends quick fix for case where owner not org member
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tgbugs committed Nov 27, 2023
1 parent f0af18b commit 186507f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sparcur/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 186507f

Please sign in to comment.