Skip to content

Commit 6b145bb

Browse files
committed
pull unused imports and format web analysis views
1 parent 218536e commit 6b145bb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

web/analysis/views.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
if TEMPORARY_TO_MAKE_RUFF_HAPPY:
7373
from bson.objectid import ObjectId
7474

75-
from dev_utils.elasticsearchdb import elastic_handler, get_analysis_index, get_calls_index, get_query_by_info_id
76-
from dev_utils.mongodb import mongo_aggregate, mongo_delete_data, mongo_find, mongo_find_one, mongo_update_one
77-
from modules.reporting.mongodb_constants import ANALYSIS_COLL, CALLS_COLL, FILE_KEY, FILE_REF_KEY, ID_KEY, INFO_ID_KEY
75+
from dev_utils.elasticsearchdb import elastic_handler, get_analysis_index, get_query_by_info_id
76+
from dev_utils.mongodb import mongo_aggregate, mongo_find_one, mongo_update_one
77+
from modules.reporting.mongodb_constants import ANALYSIS_COLL, FILE_KEY, FILE_REF_KEY, ID_KEY, INFO_ID_KEY
7878

7979
es_as_db = False
8080
es = elastic_handler
@@ -2093,9 +2093,15 @@ def on_demand(request, service: str, task_id: str, category: str, sha256):
20932093
# 4. reload page
20942094
"""
20952095

2096-
if service not in ("bingraph", "flare_capa", "vba2graph", "virustotal", "xlsdeobf", "strings", "floss",) and not getattr(
2097-
on_demand_config_mapper.get(service, {}), service
2098-
).get("on_demand"):
2096+
if service not in (
2097+
"bingraph",
2098+
"flare_capa",
2099+
"vba2graph",
2100+
"virustotal",
2101+
"xlsdeobf",
2102+
"strings",
2103+
"floss",
2104+
) and not getattr(on_demand_config_mapper.get(service, {}), service).get("on_demand"):
20992105
return render(request, "error.html", {"error": "Not supported/enabled service on demand"})
21002106

21012107
# Self Extracted support folder

0 commit comments

Comments
 (0)