You are correct!
It was WWI.
While Mexico was close to Germany during WWI, and Germany wanted Mexico to attack and attempt to take the Southwestern US, rhe government of Mexico decided not to carry out the German plan.
Maybe they didnt want to get annexed by the US.