Skip to content

Commit

Permalink
Merge pull request #26 from DataShades/SXLLCAXAAD-16
Browse files Browse the repository at this point in the history
SXLLCAXAAD-16 / fix graph refreshing on resource updates
  • Loading branch information
alexmorev authored Jan 19, 2025
2 parents 34893ca + 9154db9 commit 5455049
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 5455049

Please sign in to comment.