Skip to content

Commit

Permalink
Removed unnecessary variables that caused test failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunoda-takahiro committed Jan 22, 2025
1 parent 2ab2daf commit 3596447
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions role/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ def edit_role_referrals(self, job: Job) -> JobStatus:
@app.task(bind=True)
@may_schedule_until_job_is_ready
def import_role_v2(self, job: Job) -> tuple[JobStatus, str, None] | None:
job_id = job.id
job: Job = Job.objects.get(id=job_id)

import_data = json.loads(job.params)
err_msg = []

total_count = len(import_data)

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

# Skip processing if the role name is not provided
if "name" not in role_data:
Expand Down

0 comments on commit 3596447

Please sign in to comment.