From d918ffbd4a9835a4cd5e53252e04c6be1af113bc Mon Sep 17 00:00:00 2001 From: Alexis Viscogliosi Date: Wed, 29 Nov 2023 18:16:25 +0100 Subject: [PATCH] relationship: better returns for hasPolymorphicRelation --- schema/relationship.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/schema/relationship.go b/schema/relationship.go index 6cb1a1b8..57167859 100644 --- a/schema/relationship.go +++ b/schema/relationship.go @@ -136,11 +136,7 @@ func hasPolymorphicRelation(tagSettings map[string]string) bool { _, hasType := tagSettings["POLYMORPHICTYPE"] _, hasId := tagSettings["POLYMORPHICID"] - if hasType && hasId { - return true - } - - return false + return hasType && hasId } func (schema *Schema) setRelation(relation *Relationship) {