Skip to content
Snippets Groups Projects
Commit 46ba8f3c authored by Branson Stephens's avatar Branson Stephens
Browse files

adding alert option in writeLabel message body

parent 43a9ea5a
No related branches found
No related tags found
No related merge requests found
......@@ -518,9 +518,13 @@ class EventLabel(APIView):
})
def put(self, request, graceid, label):
#return Response("Not Implemented", status=status.HTTP_501_NOT_IMPLEMENTED)
try:
rv = create_label(graceid, label, request.ligouser)
# Look for the alert option, which may or may not be in the body.
try:
alert = request.DATA.get('alert')
except:
alert = True
rv = create_label(graceid, label, request.ligouser, alert)
except Event.DoesNotExist:
msg = "No such Event '%s'" % graceid
return Response(msg,status=status.HTTP_404_NOT_FOUND)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment