2
0
mirror of https://github.com/frappe/books.git synced 2025-01-03 15:17:30 +00:00

Merge pull request #713 from frappe/fix-patch-fail

fix: ignore error on insert into PatchRun
This commit is contained in:
Alan 2023-08-21 22:57:26 -07:00 committed by GitHub
commit 3094f05ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,5 +47,14 @@ async function makeEntry(
defaultFieldValueMap.failed = failed;
defaultFieldValueMap.version = version;
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;
}
}