restore common check in init.js (#535)

This commit is contained in:
Johannes Vogel
2023-07-03 12:27:55 +02:00
committed by GitHub
parent 60a0ea582e
commit 68f8a4fe7b

View File

@@ -4,7 +4,10 @@
* currencies, if not obtained through @capire/common.
*/
module.exports = async ()=>{
module.exports = async (tx)=>{
const has_common = tx.model.definitions['sap.common.Currencies']?.elements.numcode
if (has_common) return
await UPSERT.into ('sap.common.Currencies') .columns (
[ 'code', 'symbol', 'name' ]
) .rows (