Skip to content

Commit c161049

Browse files
Fix tests
1 parent 8d28725 commit c161049

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hasura/hasura.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ func getColumns(typ reflect.Type) []string {
213213
if !strings.HasPrefix(tag, "-") {
214214
columns = append(columns, strcase.ToSnake(field.Name))
215215
}
216-
}
217-
218-
if tag := field.Tag.Get("pg"); tag != "" {
216+
} else if tag := field.Tag.Get("pg"); tag != "" {
219217
if !strings.HasPrefix(tag, "-") && field.Name != "tableName" {
220218
columns = append(columns, strcase.ToSnake(field.Name))
221219
}
220+
} else {
221+
columns = append(columns, strcase.ToSnake(field.Name))
222222
}
223223
} else {
224224
cols := getColumns(field.Type)

0 commit comments

Comments
 (0)