Skip to content

Commit 3596447

Browse files
Removed unnecessary variables that caused test failures.
1 parent 2ab2daf commit 3596447

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

role/tasks.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ def edit_role_referrals(self, job: Job) -> JobStatus:
2525
@app.task(bind=True)
2626
@may_schedule_until_job_is_ready
2727
def import_role_v2(self, job: Job) -> tuple[JobStatus, str, None] | None:
28-
job_id = job.id
29-
job: Job = Job.objects.get(id=job_id)
30-
3128
import_data = json.loads(job.params)
3229
err_msg = []
33-
3430
total_count = len(import_data)
3531

3632
for index, role_data in enumerate(import_data):
@@ -41,7 +37,7 @@ def import_role_v2(self, job: Job) -> tuple[JobStatus, str, None] | None:
4137
if job.is_canceled():
4238
job.status = JobStatus.CANCELED
4339
job.save(update_fields=["status"])
44-
return
40+
return None
4541

4642
# Skip processing if the role name is not provided
4743
if "name" not in role_data:

0 commit comments

Comments
 (0)