mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-23 18:24:57 +02:00
make subdomain id as optional
This commit is contained in:
+7
-6
@@ -577,13 +577,14 @@ class AddReconNote(APIView):
|
||||
note.description = description
|
||||
|
||||
# get scan history for subdomain_id
|
||||
subdomain = Subdomain.objects.get(id=subdomain_id)
|
||||
note.subdomain = subdomain
|
||||
if subdomain_id:
|
||||
subdomain = Subdomain.objects.get(id=subdomain_id)
|
||||
note.subdomain = subdomain
|
||||
|
||||
# also get scan history
|
||||
scan_history_id = subdomain.scan_history.id
|
||||
scan_history = ScanHistory.objects.get(id=scan_history_id)
|
||||
note.scan_history = scan_history
|
||||
# also get scan history
|
||||
scan_history_id = subdomain.scan_history.id
|
||||
scan_history = ScanHistory.objects.get(id=scan_history_id)
|
||||
note.scan_history = scan_history
|
||||
|
||||
note.project = project
|
||||
note.save()
|
||||
|
||||
Reference in New Issue
Block a user