@@ -53,7 +53,7 @@ class Org(Versioned, BaseModel): # pylint: disable=too-few-public-methods,too-m
5353 status_code = Column (ForeignKey ("org_statuses.code" ), nullable = False )
5454 name = Column (String (250 ), index = True )
5555 branch_name = Column (String (100 ), nullable = True , default = "" ) # used for any additional info as branch name
56- access_type = Column (String (250 ), index = True , nullable = True ) # for ANONYMOUS ACCESS
56+ access_type = Column (String (250 ), index = True , nullable = True )
5757 decision_made_by = Column (String (250 ))
5858 decision_made_on = Column (DateTime , nullable = True )
5959 bcol_user_id = Column (String (20 ))
@@ -259,16 +259,9 @@ def _search_for_statuses(cls, query, statuses):
259259 .outerjoin (Invitation , Invitation .id == InvitationMembership .invitation_id )
260260 .filter (Invitation .invitation_status_code == InvitationStatus .PENDING .value )
261261 .filter (
262- (
263- (Invitation .type == InvitationType .DIRECTOR_SEARCH .value )
264- & (Org .status_code == OrgStatusEnum .ACTIVE .value )
265- & (Org .access_type == AccessType .ANONYMOUS .value )
266- )
267- | (
268- (Invitation .type == InvitationType .GOVM .value )
269- & (Org .status_code == OrgStatusEnum .PENDING_INVITE_ACCEPT .value )
270- & (Org .access_type == AccessType .GOVM .value )
271- )
262+ (Invitation .type == InvitationType .GOVM .value )
263+ & (Org .status_code == OrgStatusEnum .PENDING_INVITE_ACCEPT .value )
264+ & (Org .access_type == AccessType .GOVM .value )
272265 )
273266 )
274267 query = query .filter (Org .id .notin_ (pending_inv_subquery ))
@@ -284,16 +277,9 @@ def search_pending_activation_orgs(cls, name: str):
284277 .options (contains_eager (Org .invitations ).load_only (InvitationMembership .invitation_id ))
285278 .filter (Invitation .invitation_status_code == InvitationStatus .PENDING .value )
286279 .filter (
287- (
288- (Invitation .type == InvitationType .DIRECTOR_SEARCH .value )
289- & (Org .status_code == OrgStatusEnum .ACTIVE .value )
290- & (Org .access_type == AccessType .ANONYMOUS .value )
291- )
292- | (
293- (Invitation .type == InvitationType .GOVM .value )
294- & (Org .status_code == OrgStatusEnum .PENDING_INVITE_ACCEPT .value )
295- & (Org .access_type == AccessType .GOVM .value )
296- )
280+ (Invitation .type == InvitationType .GOVM .value )
281+ & (Org .status_code == OrgStatusEnum .PENDING_INVITE_ACCEPT .value )
282+ & (Org .access_type == AccessType .GOVM .value )
297283 )
298284 )
299285 if name :
0 commit comments