[MGNLDAM-730] dam-templating: damfn.getAsset should not find deleted asset (mgnl:deleted) Created: 07/Nov/17  Updated: 06/Dec/17  Resolved: 06/Dec/17

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM API
Affects Version/s: 2.2.7, 2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Florian Fuchs Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The damfn.getAsset() returns a marked-as-deleted asset of the DAM. Further requests on this Item will fail, e.g. to read the description of the asset.

damfn.getAsset() with an deleted asset-Item should return null, so you can catch that error with the default freemarker tools.

At the moment, you will get exceptions in your log and freemarker errors in the UI.



 Comments   
Comment by Richard Gange [ 06/Dec/17 ]

I see a couple of options here:

  1. Look for the deleted mixinType first.
  2. Use an Asset query to filter them out of the result set.
Generated at Mon Feb 12 05:02:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.