After the war.
The stab in the back myth was that the German people felt that the army had been betrayed. They thought they could have won the war if the Weimar republic didn't betray them, The army did not see this coming. They often called the Weimar republic The November Criminals.
The Treaty of Versailles