Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions app/api/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ def create_scan(
Returns -> None
"""

print(f'page_id for scanning -> {page_id}')

# get scan if scan_id present
if scan_id is not None:
created_scan = Scan.objects.get(id=scan_id)
Expand Down Expand Up @@ -428,7 +430,7 @@ def create_scan_bg(self, *args, **kwargs) -> None:


create_scan.delay(
page_id=page.id,
page_id=str(page.id),
type=type,
configs=configs,
tags=tags,
Expand Down Expand Up @@ -607,6 +609,8 @@ def create_test(
Returns -> None
"""

print(f'page_id for testing -> {page_id}')

# setting defaults
created_test = None

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

# create test
create_test.delay(
page_id=page.id,
page_id=str(page.id),
type=type,
configs=configs,
tags=tags,
Expand All @@ -829,15 +833,15 @@ def create_test_bg(self, *args, **kwargs) -> None:
if test_id:
test = Test.objects.get(id=test_id)
create_test.delay(
test_id=test_id,
page_id=test.page.id,
test_id=str(test_id),
page_id=str(test.page.id),
type=type,
configs=configs,
tags=tags,
threshold=float(threshold),
pre_scan=pre_scan,
post_scan=post_scan,
automation_id=automation_id
automation_id=str(automation_id)
)

# update schedule if task_id is not None
Expand Down