Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Nov 20, 2024
1 parent f54f4ae commit 7c2173d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/data/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ const getDataset = (xml) =>
else if (!semverSatisfies(version.get(), '2022.1.0 - 2024.1.x'))
throw Problem.user.invalidEntityForm({ reason: `Entities specification version [${version.get()}] is not supported.` });

let warnings;
if (semverSatisfies(version.get(), '<2024.1.x'))
warnings = {
const warnings = semverSatisfies(version.get(), '>=2024.1.x')
? null
: [{
type: 'oldEntityVersion',
details: { version: version.get() },
reason: `Entities specification version [${version.get()}] is not compatible with Offline Entities. Please use version 2024.1.0 or later.`
};
}];

const strippedAttrs = Object.create(null);
for (const [name, value] of Object.entries(entityAttrs.get()))
Expand Down
2 changes: 1 addition & 1 deletion lib/model/query/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ const checkDatasetWarnings = (dataset) => ({ context }) => {

if (dataset.isDefined() && dataset.get().warnings != null) {
if (!context.transitoryData.has('workflowWarnings')) context.transitoryData.set('workflowWarnings', []);
context.transitoryData.get('workflowWarnings').push(dataset.get().warnings);
context.transitoryData.get('workflowWarnings').push(...dataset.get().warnings);
}
return resolve();
};
Expand Down

0 comments on commit 7c2173d

Please sign in to comment.