2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 06:44:06 +00:00

fix: ignore error on insert into PatchRun

This commit is contained in:
18alantom 2023-08-22 11:18:36 +05:30
parent f89f3cbe7b
commit c558ee1fa3

View File

@ -47,5 +47,14 @@ async function makeEntry(
defaultFieldValueMap.failed = failed;
defaultFieldValueMap.version = version;
await dm.db!.insert('PatchRun', defaultFieldValueMap);
try {
await dm.db!.insert('PatchRun', defaultFieldValueMap);
} catch {
/**
* Error is thrown if PatchRun table hasn't been migrated.
* In this case, PatchRun will migrated post pre-migration-patches
* are run and rerun the patch.
*/
return;
}
}