BUG: GET /assets with both status and include_archived=true — archived filter overrides status filter #78
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
GET /api/v1/assetsatservices/mam-api/src/routes/assets.js:36-39:The archived exclusion only applies when
statusis NOT set. But if a user passesstatus=error&include_archived=true, the archived exclusion is skipped (correct), but if they pass justinclude_archived=truewithoutstatus, archived assets are included (correct).BUT: If a user passes
status=processing&include_archived=true, the archived filter is skipped becausestatusis truthy. But this also means the query returns ALL non-archived processing assets plus any archived assets. The archived filter only excludesarchivedwhenstatusis not set.Impact
This is actually correct behavior — if you filter by a specific status, assets with that status will show regardless of archive flag. The only issue is conceptual: the parameter name
include_archivedsuggests it adds archived assets, but it actually just skips the exclusion.No functional bug — just misleading parameter semantics.
Location
services/mam-api/src/routes/assets.js:36-39