Skip to content

Commit

Permalink
skip validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Dec 30, 2010
1 parent dd3e7e9 commit 8741056
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/devhub/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from django import http
from django.db.models import Count
from django.conf import settings
from django.shortcuts import get_object_or_404, redirect
from django.utils.http import urlquote
from django.views.decorators.cache import never_cache
Expand Down Expand Up @@ -531,6 +532,12 @@ def json_file_validation(request, addon_id, addon, file_id):

@json_view
def json_upload_detail(upload):
if not settings.VALIDATE_ADDONS:
upload.task_error = ''
upload.validation = json.dumps({'errors': 0, 'messages':[],
'notices':0, 'warnings':0})
upload.save()

validation = json.loads(upload.validation) if upload.validation else ""
url = reverse('devhub.upload_detail', args=[upload.uuid, 'json'])
full_report_url = reverse('devhub.upload_detail', args=[upload.uuid])
Expand Down
1 change: 1 addition & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,3 +689,4 @@ def read_only_mode(env):
# Full path or executable path (relative to $PATH) of the spidermonkey js
# binary. It must be a version compatible with amo-validator
SPIDERMONKEY = None
VALIDATE_ADDONS = True

0 comments on commit 8741056

Please sign in to comment.