From 0ed87d21ed2ac72bee897b98875764f6556f72ae Mon Sep 17 00:00:00 2001 From: Mark Gregson Date: Thu, 1 Dec 2016 15:45:16 +1100 Subject: [PATCH] Action rating_package_get is side_effect_free The get action doesn't cause a state change and so it is convenient to and okay to call it via a GET request. --- ckanext/rating/logic/action.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckanext/rating/logic/action.py b/ckanext/rating/logic/action.py index 64e2ce2..e433c4d 100644 --- a/ckanext/rating/logic/action.py +++ b/ckanext/rating/logic/action.py @@ -50,6 +50,8 @@ def rating_package_create(context, data_dict): return Rating.get_package_rating(package.id) + +@toolkit.side_effect_free def rating_package_get(context, data_dict): package_id = data_dict.get('package_id')