Skip to content

Commit 592e0a2

Browse files
committed
fix: migration errors as per updated source.
1 parent 608f6e1 commit 592e0a2

File tree

1 file changed

+11
-2
lines changed
  • src/routes/(console)/project-[region]-[project]/settings/migrations

1 file changed

+11
-2
lines changed

src/routes/(console)/project-[region]-[project]/settings/migrations/details.svelte

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@
2020
} from '@appwrite.io/pink-svelte';
2121
import { Button } from '$lib/elements/forms';
2222
23-
export let migration: Models.Migration = null;
2423
export let show = false;
24+
export let migration: Models.Migration = null;
25+
26+
// convert to proper json objects from string!
27+
migration.errors = migration.errors.map((err) => {
28+
try {
29+
return JSON.parse(err);
30+
} catch {
31+
return err;
32+
}
33+
});
2534
2635
type StatusCounters = {
2736
[resource in 'Database' | 'Collection' | 'Function' | 'Users']?: StatusCounter;
@@ -55,7 +64,7 @@
5564
};
5665
5766
let tab = 'details' as 'details' | 'logs';
58-
let logs = JSON.stringify(migration, null, 2);
67+
const logs = JSON.stringify(migration, null, 2);
5968
</script>
6069

6170
<Modal

0 commit comments

Comments
 (0)