Skip to content

Commit

Permalink
restore common check in init.js
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-vogel authored Jul 3, 2023
1 parent 60a0ea5 commit 942929b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bookshop/db/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 942929b

Please sign in to comment.