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.
This commit is contained in:
Mark Gregson 2016-12-01 15:45:16 +11:00
parent 993cee3323
commit 0ed87d21ed
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ def rating_package_create(context, data_dict):
return Rating.get_package_rating(package.id) return Rating.get_package_rating(package.id)
@toolkit.side_effect_free
def rating_package_get(context, data_dict): def rating_package_get(context, data_dict):
package_id = data_dict.get('package_id') package_id = data_dict.get('package_id')