Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Fix: fixes referencing assets by codenames, clears renditions array
Browse files Browse the repository at this point in the history
  • Loading branch information
Enngage committed Nov 23, 2023
1 parent ac5626f commit cb1de13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/core/translation-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export class TranslationHelper {
const id = (data as any).id;
const codename = (data as any).codename;

if (data['renditions']) {
// quick fix - do not replace id with codename for assets because that's not yet supported
data['renditions'] = [];
continue;
}

if (!codename) {
let foundCodename: string | undefined;
if (id.toLowerCase() === defaultObjectId.toLowerCase() && codenameForDefaultId) {
Expand Down
2 changes: 1 addition & 1 deletion lib/import/import.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ export class ImportService {
workflows: WorkflowContracts.IWorkflowContract[]
): WorkflowContracts.IWorkflowContract {
const workflow = workflows.find(
(m) => m.codename.toLowerCase() === languageVariant.workflow.workflow_identifier.codename
(m) => m.codename.toLowerCase() === languageVariant.workflow.workflow_identifier.codename?.toLowerCase()
);

if (!workflow) {
Expand Down

0 comments on commit cb1de13

Please sign in to comment.