mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: overriding timestamps on row duplicate action.
This commit is contained in:
+8
-2
@@ -97,7 +97,7 @@
|
||||
export let data: PageData;
|
||||
export let showRowCreateSheet: {
|
||||
show: boolean;
|
||||
row: Models.Row | null;
|
||||
row: Partial<Models.Row> | null;
|
||||
};
|
||||
|
||||
$: rows = writable(data.rows);
|
||||
@@ -543,7 +543,13 @@
|
||||
}
|
||||
|
||||
if (action === 'duplicate-row') {
|
||||
showRowCreateSheet.row = row;
|
||||
/**
|
||||
* remove dates because
|
||||
* console can override timestamps!
|
||||
*/
|
||||
const { $createdAt, $updatedAt, ...rowWithoutDates } = row;
|
||||
|
||||
showRowCreateSheet.row = rowWithoutDates;
|
||||
showRowCreateSheet.show = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user