Skip to content

Commit

Permalink
fix: do not validate draft versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej Mikulcik committed Dec 21, 2023
1 parent e1e8f46 commit 8bfe9de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/services/entity-service-decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const decorator = (service) => ({
},
});
data.vuid = relatedLocaleItem.vuid;
} else if(!data.vuid) {
} else if (!data.vuid) {
data.vuid = uuid();
data.versionNumber = 1;
data.isVisibleInListView = true;
Expand Down Expand Up @@ -290,7 +290,10 @@ const decorator = (service) => ({
// Create Version
const result = await service.create.call(this, uid, {
...opts,
data: newData,
data: {
...newData,
publishedAt: null,
},
});
// Relink all versions from other locales if result is The latest(published)!
if (result.isVisibleInListView && isLocalized) {
Expand Down

0 comments on commit 8bfe9de

Please sign in to comment.