Skip to content
Snippets Groups Projects
Commit 7e4ad393 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Bugfix to web-based event log creation

Fixed two bugs in web-based event log creation: first, attempts
to save an EventLog with a null filename, and attempted creation
of the 'lvem' tag with the wrong information, possibly resulting in
an IntegrityError due to duplicate tags.
parent f98d84a6
No related branches found
No related tags found
No related merge requests found
......@@ -228,8 +228,8 @@ def logentry(request, event, num=None):
except Exception, e:
return HttpResponseServerError(str(e))
elog.filename = filename
elog.file_version = file_version
elog.filename = filename
elog.file_version = file_version
try:
elog.save()
......@@ -269,8 +269,7 @@ def logentry(request, event, num=None):
try:
tag = Tag.objects.get(name=settings.EXTERNAL_ACCESS_TAGNAME)
except:
displayName = request.POST.get('displayName')
tag = Tag(name=tagname, displayName=displayName)
tag = Tag(name=settings.EXTERNAL_ACCESS_TAGNAME)
tag.save()
# I'm putting this in a try/except in case the user has already
# added the external access tagname somehow, and the following
......
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