Why would a common currency such as the Euro that can't be devalued be incentive for banks to lend money to a country? I'm reading an article that is claiming that when the Euro was created, banks began lending more money to countries than before because as the Euro is a common currency across many countries one country can't devalue it. According to this article, 


  If you take 10 million Deutsche Marks from Frankfurt and you give it to a Spanish, Greek or Italian firm or bank - and that is prior to monetary union - and then suddenly there is a substantial devaluation of the currency of Spain, of Italy or Greece - something that was happening at regular intervals prior to monetary union - then you know that the capacity of the creditors to repay the loan shrinks. Because their income comes int he local currency, they will not be able to repay when the local currency is devalued.


Why does this matter? If a country was using the Euro, wouldn't they be getting(ignoring increase/decrease in exports and imports due to the devaluation) roughly the same amount of money but in Euros instead of the local currency? I would appreciate clarification on how and why this devaluation is different in terms of repayment.

EDIT: For context, the source I'm reading is as follows: Varoufakis, Yanis. "CREDITORS UNINTERESTED IN GETTING THEIR MONEY BACK: DISSOLVING THE EUROZONE PARADOX." The Journal of Australian Political Economy, no. 77 (2016): 23-36.
When you lend Spain 10 million Deutsche marks, the loan is denominated in a foreign currency: they have to return you 10 million Deutsche Marks (ignoring interest for the moment). But the Spanish earn their income in local currency. If in the meantime their local currency depreciates relative to the Deutsche Mark, the value of the repayment becomes greater in terms of the proportion of their income (which is in local currency) and their ability to repay becomes smaller.

If you lend them Euros and they receive their income in Euros, a devaluation doesn't affect the (local) value of the debt.