Skip to content
Snippets Groups Projects
Commit 8cee4bb5 authored by Alexander Pace's avatar Alexander Pace
Browse files

Looks like removing labels works? I'm going to see if people want to test it.

parent 49fd5f72
No related branches found
No related tags found
No related merge requests found
......@@ -206,13 +206,13 @@ def delete_label(event, request, labelName):
# error if it isn't. There might be a more elegant way of doing this.
if label not in event.labels.all():
d['warning'] = "No label '%s' associated with event %s" % (labelName, event.graceid())
raise ValueError( "No label '%s' associated with event %s" % (labelName, event.graceid()))
else:
labelling = Labelling(
this_label = Labelling.objects.get(
event = event,
label = label,
creator = creator
)
labelling.delete()
this_label.delete()
message = "Deleted label: %s" % label.name
log = EventLog(event=event, issuer=creator, comment=message)
try:
......
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