build_related_resource bug fix for create/update