Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

delete contacts once callback is done

  • Loading branch information...
commit cd550f4527825ef239c3406bbdce2c7996d62d74 1 parent 9936e59
Brian Rosner brosner authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 contacts_import/views.py
6 contacts_import/views.py
@@ -78,7 +78,11 @@ def import_contacts(request, template_name="contacts_import/import_contacts.html
78 78 if not selected:
79 79 Contact.objects.filter(user=request.user).delete()
80 80 return HttpResponseRedirect(reverse("import_contacts"))
81   - return callback(request, selected)
  81 + # give control over to the callback which is required to
  82 + # return a HttpResponse
  83 + response = callback(request, selected)
  84 + Contact.objects.filter(user=request.user).delete()
  85 + return response
82 86 else:
83 87 form = VcardImportForm()
84 88

0 comments on commit cd550f4

Please sign in to comment.
Something went wrong with that request. Please try again.