Commit ff4637e9 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Made cockpit more resilient to double entries in the mysql DB

parent f707f9c6
......@@ -7,7 +7,7 @@ import sys
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.contrib import messages
from django.template import RequestContext
from django.views.decorators.csrf import csrf_exempt
......@@ -213,6 +213,8 @@ def pushdata(request): = simplejson.dumps(d['metricData'])
debug[m] = "updated" # debug
except MultipleObjectsReturned:
debug[m] = "not updated - multiple objects found" # debug
debug[m] = "not updated" # debug
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment