Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit a001d68

Browse files
cleanup
1 parent f1eddb4 commit a001d68

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tasks/sync_teams.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ def run_impl(self, db_session, ownerid, *, username=None, **kwargs):
5959
),
6060
)
6161
for org_ownerid in removed_orgs:
62-
org = db_session.query(Owner).filter(Owner.ownerid == org_ownerid).first()
62+
org = (
63+
db_session.query(Owner).filter(Owner.ownerid == org_ownerid).first()
64+
)
6365
if org and ownerid in org.plan_activated_users:
6466
log.info(
6567
"Removing user from org's plan_activated_users",
66-
extra=dict(user_ownerid=ownerid, org_ownerid=org_ownerid)
68+
extra=dict(user_ownerid=ownerid, org_ownerid=org_ownerid),
6769
)
6870
org.plan_activated_users.remove(ownerid)
6971

tasks/tests/unit/test_sync_teams_task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_team_removed(self, mocker, mock_configuration, dbsession, codecov_vcr):
3939
)
4040
prev_team.plan_activated_users = [user.ownerid]
4141
dbsession.add(user)
42+
dbsession.add(prev_team)
4243
dbsession.flush()
4344
SyncTeamsTask().run_impl(dbsession, user.ownerid, using_integration=False)
4445
assert prev_team.ownerid not in user.organizations

0 commit comments

Comments
 (0)