def put(self, *args, **kwargs): organization = kwargs.get('organization', None) org = self.validate_request(organization) self.clean_request(organization) project = Project(**self.data) try: project.save(validate=True, clean=True) self.set_user_permission(project) except ValidationError, error: raise HTTPError(500, **{'reason': self.error_message(error)})
def put (self, *args, **kwargs): organization = kwargs.get('organization', None) org = self.validate_request(organization) self.clean_request(organization) project = Project(**self.data) try: project.save(validate=True, clean=True) self.set_user_permission(project) except ValidationError, error: raise HTTPError(500, **{'reason':self.error_message(error)})
def put(self, *args, **kwargs): self.clean_request() project = Project(**self.data) try: project.save(validate=True, clean=True) ProjectMetadata.create_project_metadata(project) Story.create_todo(project, self.current_user) self.create_role(project, creating_project=True) Team.create_team(project=project, user=self.current_user) except ValidationError, error: raise HTTPError(500, **{'reason': self.error_message(error)})
def put(self, *args, **kwargs): self.clean_request() project = Project(**self.data) try: project.save(validate=True, clean=True) ProjectMetadata.create_project_metadata(project) Story.create_todo(project, self.current_user) self.create_role(project, creating_project=True) Team.create_team(project=project, user=self.current_user) except ValidationError, error: raise HTTPError(500, **{'reason':self.error_message(error)})