Commits

Richard Jones committed 3cc1544

fix

Comments (0)

Files changed (1)

pyweek/challenge/views/files.py

 
     # avoid dupes
     if os.path.exists(os.path.join(MEDIA_ROOT, str(challenge.number), entry.name,
-            request.FILES['content'].filename)):
+            request.FILES['content'].name)):
         f._errors['content'] = f.error_class(["File with that filename already exists."])
         return render_to_response('challenge/entry_file.html', info,
             context_instance=RequestContext(request))
 
     # avoid dupes
     if os.path.exists(os.path.join(MEDIA_ROOT, str(challenge.number), entry.name,
-            request.FILES['content'].filename)):
+            request.FILES['content_file'].name)):
         return HttpResponse('File with that filename already exists.')
 
     file = models.File(