Skip to content

Commit 4b51553

Browse files
committed
update: changes as per appwrite#9947.
1 parent 945c5d3 commit 4b51553

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/lib/components/csvImportBox.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@
3232
payload: Payload
3333
) {
3434
const isSuccess = payload.status === 'completed';
35-
36-
// TODO: the migrations worker sends 2 events!
37-
const isError = !isSuccess && !!payload.error;
35+
const isError = !isSuccess && !!payload.errors;
3836
3937
if (!isSuccess && !isError) return;
4038
4139
const type = isSuccess ? 'success' : 'error';
42-
const message = isError ? payload.error : 'CSV import finished successfully.';
40+
const message = isSuccess
41+
? 'CSV import finished successfully.'
42+
: (payload.errors[0]?.message ??
43+
'Import failed. Check your CSV for correct fields and required values.');
4344
4445
const url = `${base}/project-${page.params.region}-${page.params.project}/databases/database-${database}/collection-${collection}`;
4546

src/lib/stores/preferences.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ function createPreferences() {
107107
}
108108
);
109109
},
110-
111110
getCustomCollectionColumns: (collectionId: string): Preferences['columns'] => {
112111
return preferences?.collections?.[collectionId] ?? [];
113112
},

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/table.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
{:else}
252252
{@const formatted = formatColumn(document[id])}
253253
{@const isDatetimeAttribute = attr.type === 'datetime'}
254-
{@const isEncryptedAttribute = isString(attr) && !attr.encrypt}
254+
{@const isEncryptedAttribute = isString(attr) && attr.encrypt}
255255
{#if isDatetimeAttribute}
256256
<DualTimeView time={formatted.whole}>
257257
<span slot="title">Timestamp</span>

0 commit comments

Comments
 (0)