Has many belongs to relation deletion error

ok i found this useful so far: https://elixirforum.com/t/constraint-error-when-attempting-to-delete-struct/13689/2

although not perfect, I would like to keep my users not delete them, i also tried nullify but with that the users cannot be displayed since that filed does not have the propertied that it would want to display (team name)