fix the bug when user tries to delete a verification that doesn't exist

pull/1/head
eric 2014-02-11 12:40:46 -05:00
parent 68eb2ef26e
commit 16159be44e
1 changed files with 2 additions and 0 deletions

View File

@ -194,6 +194,8 @@ class UpdateLibraryView(BaseLibraryView, UpdateView):
backend_model_instance = form_model.objects.get(id=backend_id)
backend_model_instance.delete()
status = 'Deleted.'
else:
status = 'Nothing to delete.'
context_data = self.get_context_data( form=self.form_class(instance=self.object))
context_data['status'] = status
return self.render_to_response(context_data)