relationship: better returns for hasPolymorphicRelation

This commit is contained in:
Alexis Viscogliosi 2023-11-29 18:16:25 +01:00
parent 40bf1e6b4f
commit d918ffbd4a

View File

@ -136,11 +136,7 @@ func hasPolymorphicRelation(tagSettings map[string]string) bool {
_, hasType := tagSettings["POLYMORPHICTYPE"] _, hasType := tagSettings["POLYMORPHICTYPE"]
_, hasId := tagSettings["POLYMORPHICID"] _, hasId := tagSettings["POLYMORPHICID"]
if hasType && hasId { return hasType && hasId
return true
}
return false
} }
func (schema *Schema) setRelation(relation *Relationship) { func (schema *Schema) setRelation(relation *Relationship) {