I got this issue in my production database but for other database it is working fine
error :
{
“data”: {},
“error”: {
“status”: 500,
“name”: “Internal Server Error”,
“message”: “An error occurred while updating the saved list”,
“details”: {
“error”: “1 relation(s) of type api::meditation-page.meditation-page associated with this entity do not exist”
}
}
}
below is the part of my code :
await strapi.entityService.update(
"plugin::users-permissions.user",
user.id,
{
data: {
saved_blogs: savedBlogs
.map((item) => item.id)
.concat(Array.from(blog_id)),
saved_eats: savedEats
.map((item) => item.id)
.concat(Array.from(eat_id)),
saved_features: savedFeatures
.map((item) => item.id)
.concat(Array.from(feature_id)),
saved_meditations: savedMeditations
.map((item) => item.id)
.concat(Array.from(meditation_id)),
saved_workouts: savedWorkouts
.map((item) => item.id)
.concat(Array.from(workout_id)),
},
}
);
The issue is appearing only for the saved_meditations but for other it is working and structure for all of them are same .
Also the issue is very different it does works for some of the items in meditations table , but for the new items I add it is giving me the above issue .