fixed edit form throwing an error when a field is a relation