Skip to content

Commit fe68964

Browse files
authored
Merge pull request #222 from Scanerr-io/dev
debugging prod issue
2 parents c70082c + 485a21e commit fe68964

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/api/tasks.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ def create_scan(
301301
Returns -> None
302302
"""
303303

304+
print(f'page_id for scanning -> {page_id}')
305+
304306
# get scan if scan_id present
305307
if scan_id is not None:
306308
created_scan = Scan.objects.get(id=scan_id)
@@ -428,7 +430,7 @@ def create_scan_bg(self, *args, **kwargs) -> None:
428430

429431

430432
create_scan.delay(
431-
page_id=page.id,
433+
page_id=str(page.id),
432434
type=type,
433435
configs=configs,
434436
tags=tags,
@@ -607,6 +609,8 @@ def create_test(
607609
Returns -> None
608610
"""
609611

612+
print(f'page_id for testing -> {page_id}')
613+
610614
# setting defaults
611615
created_test = None
612616

@@ -815,7 +819,7 @@ def create_test_bg(self, *args, **kwargs) -> None:
815819

816820
# create test
817821
create_test.delay(
818-
page_id=page.id,
822+
page_id=str(page.id),
819823
type=type,
820824
configs=configs,
821825
tags=tags,
@@ -829,15 +833,15 @@ def create_test_bg(self, *args, **kwargs) -> None:
829833
if test_id:
830834
test = Test.objects.get(id=test_id)
831835
create_test.delay(
832-
test_id=test_id,
833-
page_id=test.page.id,
836+
test_id=str(test_id),
837+
page_id=str(test.page.id),
834838
type=type,
835839
configs=configs,
836840
tags=tags,
837841
threshold=float(threshold),
838842
pre_scan=pre_scan,
839843
post_scan=post_scan,
840-
automation_id=automation_id
844+
automation_id=str(automation_id)
841845
)
842846

843847
# update schedule if task_id is not None

0 commit comments

Comments
 (0)