def add_release_task(request): results = {'success': False} try: release_id = request.GET['rel_id'] release = Release.objects.get(id=release_id) task = ReleaseTask() task.release = release task.order = 999 task.name = request.GET['task'] task.save() results = {'success': True} except Exception as ex: results = {'success': False, 'error': ex.message} json = simplejson.dumps(results) return HttpResponse(json, mimetype='application/json')
def add_release_task(request): results = {'success':False} try: task = ReleaseTask() if request.GET.__contains__('rel_id') and request.GET['rel_id'] != 'null': release = Release.objects.get(id=request.GET['rel_id']) task.release = release if request.GET.__contains__('story_id') and request.GET['story_id'] != 'null': story = Story.objects.get(id=request.GET['story_id']) task.story = story task.order = 999 task.name = request.GET['task'] task.save() results = {'success':True} except Exception as ex: results = {'success':False, 'error':ex.message} json = simplejson.dumps(results) return HttpResponse(json, mimetype='application/json')
def add_release_task(request): results = {'success':False} try: release_id = request.GET['rel_id'] release = Release.objects.get(id=release_id) task = ReleaseTask() task.release = release task.order = 999 task.name = request.GET['task'] task.save() results = {'success':True} except Exception as ex: results = {'success':False, 'error':ex.message} json = simplejson.dumps(results) return HttpResponse(json, mimetype='application/json')
def add_release_task(request): results = {"success": False} try: task = ReleaseTask() if request.GET.__contains__("rel_id") and request.GET["rel_id"] != "null": release = Release.objects.get(id=request.GET["rel_id"]) task.release = release if request.GET.__contains__("story_id") and request.GET["story_id"] != "null": story = Story.objects.get(id=request.GET["story_id"]) task.story = story task.order = 999 task.name = request.GET["task"] task.save() results = {"success": True} except Exception as ex: results = {"success": False, "error": ex.message} json = simplejson.dumps(results) return HttpResponse(json, mimetype="application/json")