deduplicate looked up results

This commit is contained in:
Joost Agterhoek 2025-08-16 17:11:36 +02:00
parent 4b67b70a82
commit 11539eda9d

View File

@ -53,21 +53,7 @@ def create_app(test_config=None):
session["test"] = test session["test"] = test
session["results"] = pickle.dumps(results) session["results"] = pickle.dumps(results)
### TESTING
build_history(results) build_history(results)
print("build_history just ran...")
# session["results"] = pickle.dumps(results)
# if "history" in session:
# print("HISTORY IS IN SESSION")
# current_history = pickle.loads(session["history"])
# for result in results:
# if result not in current_history:
# current_history.append(result)
# session["history"] = pickle.dumps(current_history)
# elif "history" not in session:
# print("HISTORY IS NOT IN SESSION")
# session["history"] = pickle.dumps(results)
### END TESTING
if any(results): if any(results):
results_present = True results_present = True
if any(errors): if any(errors):
@ -86,6 +72,7 @@ def create_app(test_config=None):
def build_results(hosts): def build_results(hosts):
results = [] results = []
hosts = list(set(hosts))
for host in hosts: for host in hosts:
result = host_lookup.Lookedup(host) result = host_lookup.Lookedup(host)
results.append(result) results.append(result)