Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 4fac380

Browse files
authored
Fix disableSoftDelete
I had the same issue a while ago. $disableSoftDelete must be set as a param and not as part of the query parameters. A little bit confusing, as the $ makes it look just like other query parameters.
1 parent bd2312f commit 4fac380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/helper/get-unique-slug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const getUniqueSlug = (service, slug, count, id) => {
44

55
// Test if we already have data with this slug
66
const query = {
7-
$disableSoftDelete: true,
87
slug: testSlug
98
};
109
// ignore entry with given id (if set)
@@ -15,6 +14,7 @@ const getUniqueSlug = (service, slug, count, id) => {
1514
}
1615
service.find({
1716
query,
17+
$disableSoftDelete: true,
1818
_populate: 'skip'
1919
}).then((result) => {
2020
if (result.data.length > 0) {

0 commit comments

Comments
 (0)