Skip to content

Commit

Permalink
LOC-5545 - Strapi: Add support for required fields (#16)
Browse files Browse the repository at this point in the history
fix required field issue while creating an entry

Co-authored-by: david-vaclavek <[email protected]>
  • Loading branch information
david-vaclavek and david-vaclavek committed Nov 16, 2022
1 parent 4746e9a commit 0613c7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/services/strapi-i18n-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ module.exports = ({ strapi }) => ({
"locale",
"id",
"createdAt",
"publishedAt", // * sets as draft (no timestamp)
// "publishedAt",
"updatedAt",
]);
filteredNewEntry.locale = newEntryLocale;
// * sets as draft (no timestamp)
// ! do not completely omit as it won't process the required fields
filteredNewEntry.publishedAt = null;

newLocalizationCtx.request.body = filteredNewEntry;

Expand Down

0 comments on commit 0613c7f

Please sign in to comment.