It cannot need much discussion to change the law.
https://www.bbc.co.uk/news/world-europe-50257922
It could be worse. The rapists will still be going to prison albeit for a lesser crime than rape. But clearly the law in Spain needs to be changed.
The court ruled out rape because the victim was in an "unconscious state" and the accused had not used violence or intimidation.
If the victim is unconscious, you don't need violence or intimidation, although, in this case, the victim was unconscious because she was full of drugs and alcohol which presumably the rapists gave her - seems like a bit of a loophole. The law in Spain definitely needs changing.