I was trying to return a string using render_template, but it's only returning the else statement. But it's working when I'm trying to print in the console. But not when I'm trying to use in jinja.
def healthchecker():
# health = ""
for key,value in raw.items():
if 'properties' in value:
health = "Yes"
print(health)
else:
health = "None"
print(health)
return health
return render_template('portlist.html', data = raw, health = healthchecker())