I think the most correct way to do this would be for the POST to `/edit_task` to omit the hostname arg completely unless it is purposefully setting the hostname to a remote host. Then `args.get('hostname')` should evaluate to `None`. You should also not use the `args['attr']` form for any non-required arg since it will throw a `KeyError` if the arg is not found.