Skip to content

Commit acbddbf

Browse files
committed
Remove unnecessary variable
1 parent 7102be3 commit acbddbf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

backend/btrixcloud/migrations/migration_0057_replicate_files.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def migrate_up(self):
5757
for file_ in crawl.files:
5858
if not file_.replicas:
5959
# Check that there isn't an in-progress job for this file
60-
matching_job = await jobs_mdb.find(
60+
if await jobs_mdb.find(
6161
{
6262
"type": BgJobType.CREATE_REPLICA.value,
6363
"object_id": crawl.id,
@@ -66,8 +66,7 @@ async def migrate_up(self):
6666
"started": {"$ne": None},
6767
"finished": None,
6868
}
69-
)
70-
if matching_job:
69+
):
7170
continue
7271

7372
try:
@@ -94,7 +93,7 @@ async def migrate_up(self):
9493
continue
9594

9695
# Check there isn't already an in-progress job for this profile
97-
matching_job = await jobs_mdb.find(
96+
if await jobs_mdb.find(
9897
{
9998
"type": BgJobType.CREATE_REPLICA.value,
10099
"object_id": profile.id,
@@ -103,8 +102,7 @@ async def migrate_up(self):
103102
"started": {"$ne": None},
104103
"finished": None,
105104
}
106-
)
107-
if matching_job:
105+
):
108106
continue
109107

110108
try:

0 commit comments

Comments
 (0)