Switzerland was not invaded during either of the world wars. Swiss neutrality was seriously questioned by the Grimm–Hoffmann Affair, but it was short-lived. Switzerland joined the League of Nations, which was based in Geneva, on condition that it was exempt from any military requirements.