Was Joseph Sold to Ishmaelites or Midianites?

The narrative in Genesis explains Joseph’s sale to traders identified as both Ishmaelites and Midianites, highlighting the fluidity of tribal identities in commerce.