FAQ | This is a LIVE service | Changelog

Skip to content

Re-fetch asset via getAsset() on successful PUT/POST

Dr Rich Wareham requested to merge github/fork/rjw57/issue-86 into master

If a POST or PUT request succeeds, re-fetch the asset via getAsset to make sure that the record in assets.assetsByUrl is fresh. Most of the time this will be freshened when the asset list is re-fetched but in some circumstances this will not happen.

As an example: user is a member of two institutions, A and B.

  1. They start on list of A assets.
  2. They edit an asset to move it to B.
  3. On saving they are re-directed back to list of A assets.

Our asset cache is now stale. There are other examples. Many probably don't matter in the long run but we should re-fetch the asset to cover ourselves in all cases.

Closes #86 (closed)

Merge request reports

Loading