Merged parts of PR #651 and fixed the rest
This commit is contained in:
Tomas Bures 2019-08-07 14:29:58 +02:00
parent 5cae9c849c
commit 30e03adf0c
5 changed files with 51 additions and 32 deletions

View file

@ -529,7 +529,7 @@ async function _createTx(tx, context, entity, content) {
if (copyFilesFrom) {
await files.copyAllTx(tx, context, copyFilesFrom.entityType, 'file', copyFilesFrom.entityId, 'campaign', 'file', id);
convertFileURLs(data.sourceCustom, copyFilesFrom.entityType, copyFilesFrom.entityId, 'campaign', id, true);
convertFileURLs(data.sourceCustom, copyFilesFrom.entityType, copyFilesFrom.entityId, 'campaign', id);
await tx('campaigns')
.update({
data: JSON.stringify(data)