Hmm... but... you are saving them, aren't you? Ah, but you set something in between. Ok, how about this monstrosity:

    cur_log = cls.objects.get_or_initialize(device=UnregisteredDevice.objects.get_or_create(id=id))
    cur_log.npings += 1
    cur_log.ip = ip
    cur_log.save()