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

Not entirely sure the fix is the best one, but at least it looks to be working fine.