Skip to content

Commit

Permalink
fix: do not fetch archived entries
Browse files Browse the repository at this point in the history
Since we cannot apply any transformations on archived entries, and since attempting to update archived entries results in an error, we skip fetching those from the API.

They will however still be taken into account when trying to delete a content type, so that we do not run into problems with validations there.
  • Loading branch information
TimBeyer committed Jan 3, 2019
1 parent ddfae9d commit b3b7ac3
Show file tree
Hide file tree
Showing 4 changed files with 1,114 additions and 1,113 deletions.
3 changes: 2 additions & 1 deletion src/lib/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export default class Fetcher implements APIFetcher {
}

const filter = {
'sys.contentType.sys.id[in]': ids.join(',')
'sys.contentType.sys.id[in]': ids.join(','),
'sys.archivedAt[exists]': 'false'
}

const entries = await this.fetchAllPaginatedItems<APIEntry>('/entries', filter)
Expand Down
Loading

0 comments on commit b3b7ac3

Please sign in to comment.