This was after World War I.
During World War II, Hitler and Stalin signed a non-aggression pact. Hitler broke his word. Less famously, Stalin was preparing to break his word and attack Hitler; but Hitler struck first.
A non-aggression pact is only worth the price of paper and ink when the nations who signed it no longer feel bound by it.
And, as Edward Conway pointed out, this would not stop wars elsewhere in the world.
World peace is a wonderful dream, but it cannot be guaranteed by a treaty. History has already shown us so.