mirror of
https://github.com/strapi/strapi.git
synced 2025-10-17 19:13:25 +00:00
Merge pull request #3345 from strapi/fix/rename-model
Fix model rename not using the right api name to persist files
This commit is contained in:
commit
b1e14730a2
@ -175,7 +175,7 @@ module.exports = {
|
||||
if (plugin) {
|
||||
await Service.writeModel(name, modelJSON, { plugin });
|
||||
} else {
|
||||
await Service.writeModel(name, modelJSON, { api: modelData.apiName });
|
||||
await Service.writeModel(name, modelJSON, { api: name !== model ? name.toLowerCase() : modelData.apiName});
|
||||
}
|
||||
|
||||
ctx.send({ ok: true });
|
||||
|
Loading…
x
Reference in New Issue
Block a user