Use FieldSubtype enum instead of raw strings.

This commit is contained in:
Sam Rose 2023-10-25 16:37:15 +01:00
parent 7acce7b7c0
commit 2c5dd99da2
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@
} from "@budibase/bbui"
import { getContext } from "svelte"
import { ValidColumnNameRegex } from "@budibase/shared-core"
import { FieldSubtype } from "@budibase/types"
const { API, definition, rows } = getContext("grid")
@ -25,9 +26,9 @@
}
const migrateUserColumn = async () => {
let subtype = "users"
let subtype = FieldSubtype.USERS
if (column.schema.relationshipType === "one-to-many") {
subtype = "user"
subtype = FieldSubtype.USER
}
try {