Skip to content

Commit

Permalink
Update the schema version parsing to not always return 0
Browse files Browse the repository at this point in the history
Signed-off-by: Loic Reyreaud <loic@weaviate.io>
  • Loading branch information
reyreaud-l committed Apr 25, 2024
1 parent 4aac149 commit 32d8fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapters/handlers/rest/clusterapi/schema_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
func extractSchemaVersionFromUrlQuery(values url.Values) uint64 {
var schemaVersion uint64
if v := values.Get(replica.SchemaVersionKey); v != "" {
if vAsUint64, err := strconv.ParseUint(v, 10, 64); err != nil {
if vAsUint64, err := strconv.ParseUint(v, 10, 64); err == nil {
schemaVersion = vAsUint64
}
}
Expand Down

0 comments on commit 32d8fe9

Please sign in to comment.