(refactor) fix incorrect error handling on updateClass
The previous refactor introduced a small issue where after successful
type assertion, we would still panic because we didn't return before.
@@ -225,6 +225,9 @@ func addPrimitivePropToQuery(q *gremlin.Query, propType schema.PropertyDataType,
default:
return q, fmt.Errorf("Illegal value for property %s", sanitizedPropertyName)
}
- }
+ default:
panic(fmt.Sprintf("Unkown primitive datatype %s", propType.AsPrimitive()))
}
+
+ return q, nil
+}
