Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
is_touch=convertBool(hit["ua"]["is_touch"]),
browser=hit["ua"]["browser"],
device=hit["ua"]["device"],
country=hit["geo"]["country_name"],
latitude=float(hit["geo"]["latitude"]),
longitude=float(hit["geo"]["longitude"]),
region=hit["geo"]["region"],
city=hit["geo"]["city"]
)
hit_objs.append(hit_obj)
if verbosity == 1:
if i > 0:
print(i, "hits")
elif verbosity > 1:
print(i, "hits")
Hit.objects.using(db).bulk_create(hit_objs)
return i