зеркало из https://github.com/mozilla/FlightDeck.git
After code review
This commit is contained in:
Родитель
d52d9786ec
Коммит
02dbaf39c0
|
@ -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(
|
||||
|
|
Загрузка…
Ссылка в новой задаче