Rename ATTACHMENT to ATTACHMENTS
This commit is contained in:
parent
757284d6c0
commit
aabee4d90e
|
@ -394,7 +394,7 @@
|
|||
FIELDS.BIGINT,
|
||||
FIELDS.BOOLEAN,
|
||||
FIELDS.DATETIME,
|
||||
FIELDS.ATTACHMENT,
|
||||
FIELDS.ATTACHMENTS,
|
||||
FIELDS.ATTACHMENT_SINGLE,
|
||||
FIELDS.LINK,
|
||||
FIELDS.FORMULA,
|
||||
|
|
|
@ -107,7 +107,7 @@ export const FIELDS = {
|
|||
},
|
||||
},
|
||||
},
|
||||
ATTACHMENT: {
|
||||
ATTACHMENTS: {
|
||||
name: "Attachment List",
|
||||
type: FieldType.ATTACHMENTS,
|
||||
icon: "Folder",
|
||||
|
|
|
@ -192,7 +192,7 @@ const parseType = (value, type) => {
|
|||
}
|
||||
|
||||
// Parse attachments, treating no elements as null
|
||||
if (type === FieldTypes.ATTACHMENT) {
|
||||
if (type === FieldTypes.ATTACHMENTS) {
|
||||
if (!Array.isArray(value) || !value.length) {
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ export async function checkForColumnUpdates(
|
|||
column.subtype !== oldTable?.schema[column.name]?.subtype
|
||||
)
|
||||
for (const attachmentColumn of changedAttachmentSubtypeColumns) {
|
||||
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENT.SINGLE) {
|
||||
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENTS.SINGLE) {
|
||||
attachmentColumn.constraints ??= { length: {} }
|
||||
attachmentColumn.constraints.length ??= {}
|
||||
attachmentColumn.constraints.length.maximum = 1
|
||||
|
|
|
@ -48,7 +48,7 @@ export const FieldTypeSubtypes = {
|
|||
USER: FieldSubtype.USER as FieldSubtype.USER,
|
||||
USERS: FieldSubtype.USERS as FieldSubtype.USERS,
|
||||
},
|
||||
ATTACHMENT: {
|
||||
ATTACHMENTS: {
|
||||
SINGLE: FieldSubtype.SINGLE as FieldSubtype.SINGLE,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue