Skip to content

Commit

Permalink
SXLLCAXAAD-16 / fix graph refreshing on resource updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmorev committed Jan 19, 2025
1 parent 34893ca commit 9154db9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ckanext/charts/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ def before_resource_delete(
fetchers.DatastoreDataFetcher(resource["id"]).make_cache_key(),
)

def after_resource_update(
self,
context: types.Context,
resource: dict[str, Any]) -> None:
cache.invalidate_by_key(
fetchers.DatastoreDataFetcher(resource["id"]).make_cache_key(),
)


class ChartsBuilderViewPlugin(p.SingletonPlugin):
p.implements(p.IResourceView)
Expand Down

0 comments on commit 9154db9

Please sign in to comment.