I have this design:
try: turn_ip = TurnIp.get(TurnIp.turn == turn.id) except TurnIp.DoesNotExist: turn_ip = None Is it possible to replace it with something like get_or_None , so that in case of a failed search, I’ll return None , and not an error?