The Spanish Civil War is probably the most misrepresented event of the 20th century. It is usually portrayed as a conflict between "democracy" and "fascism," but it was in fact a conflict between authoritarian, conservative Catholic monarchism and totalitarian communism (notwithstanding the anarchist presence).
You are exactly right. And the good guys won!