Prevent some database/integrity errors 

Probably because GoalServer API does not send proper IDS