polices: add helper to remove None-value keys from dict for policies

This commit is contained in:
Jens Langhammer
2020-07-08 23:03:58 +02:00
parent d786fa4b7c
commit e58ac7ae90
5 changed files with 25 additions and 7 deletions

View File

@ -21,7 +21,6 @@ def save_ip_reputation():
for key in keys:
score = cache.get(key)
remote_ip = key.replace(CACHE_KEY_IP_PREFIX, "")
print(remote_ip)
rep, _ = IPReputation.objects.get_or_create(ip=remote_ip)
rep.score = score
objects_to_update.append(rep)