# HG changeset patch # User cavaliet # Date 1358418919 -3600 # Node ID a692c2d0cef789f8af29377c9242034124e18b5d # Parent 7271a554968295d592a74fda51e9a3f36498d9a2 api : avoid PUT request with a list of projects. diff -r 7271a5549682 -r a692c2d0cef7 src/ldt/ldt/api/ldt/resources/project.py --- a/src/ldt/ldt/api/ldt/resources/project.py Wed Jan 16 05:34:32 2013 +0100 +++ b/src/ldt/ldt/api/ldt/resources/project.py Thu Jan 17 11:35:19 2013 +0100 @@ -11,6 +11,7 @@ from tastypie.authorization import Authorization from tastypie.resources import Bundle, ModelResource, ALL from tastypie import fields +from tastypie.exceptions import BadRequest class ProjectResource(ModelResource): @@ -63,4 +64,7 @@ assign('ldt_utils.view_project', everyone, bundle.obj) protect_models() return bundle + + def obj_delete_list(self, request=None, **kwargs): + raise BadRequest("PUT with a list of projects is forbidden.") \ No newline at end of file