flask serialize model with relations