The Prophet ﷺ said, "If anybody has to take an oath, he should swear only by Allah." The people of Quraish used to swear by their fathers, but the Prophet ﷺ said, "Do not swear by your fathers. "
عَنِ النَّبِيِّ ﷺ قَالَ أَلاَ مَنْ كَانَ حَالِفًا فَلاَ يَحْلِفْ إِلاَّ بِاللَّهِ فَكَانَتْ قُرَيْشٌ تَحْلِفُ بِآبَائِهَا فَقَالَ لاَ تَحْلِفُوا بِآبَائِكُمْ