This commit is contained in:
Piotr Zalewa 2011-08-30 11:18:39 +01:00
Родитель d52d9786ec
Коммит 02dbaf39c0
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -3,7 +3,7 @@ from django.conf import settings
from lxml import etree
import urllib2
log = commonware.log.getLogger('f.authentication')
log = commonware.log.getLogger('f.amo')
get_addon_amo_api_url = lambda id: "%s://%s/api/%s/addon/%d" % (

Просмотреть файл

@ -1,7 +1,7 @@
import commonware.log
import simplejson
from django.shortcuts import render_to_response
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseBadRequest
from amo import tasks
@ -17,7 +17,7 @@ def upload_to_amo(request, pk):
"""Upload a XPI to AMO
"""
# check if there this Add-on was uploaded with the same version name
revision = PackageRevision.objects.get(pk=pk)
revision = get_object_or_404(PackageRevision, pk=pk)
version = revision.get_version_name()
uploaded = PackageRevision.objects.filter(
package=revision.package).filter(