Skip to content

Commit

Permalink
Merge pull request #475 from magopian/1139674-addon-validation-page-t…
Browse files Browse the repository at this point in the history
…runcated-message

Don't fail on warnings truncation on the addon validation page (bug 1139674)
  • Loading branch information
magopian committed Mar 16, 2015
2 parents 8cefaa1 + 4a1aec0 commit 828a4cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/devhub/utils.py
Expand Up @@ -54,6 +54,8 @@ def limit_validation_results(validation, is_compatibility=False):
validation['messages'].append({
'tier': 1,
'type': msgtype,
# To respect the message structure, see bug 1139674.
'id': ['validation', 'messages', 'truncated'],
'message': (_('Validation generated too many errors/'
'warnings so %s messages were truncated. '
'After addressing the visible messages, '
Expand Down
4 changes: 3 additions & 1 deletion static/js/common/upload-addon.js
Expand Up @@ -341,7 +341,9 @@
], current, matched, messages = [],
// this.id is in the form ["testcases_javascript_instanceactions", "_call_expression", "createelement_variable"],
// we usually only match one of the elements.
matchId = function (id) {return _.contains(this.id, id);};
matchId = function (id) {
return this.hasOwnProperty('id') && _.contains(this.id, id);
};

if (!upload_results.parents('.add-file-modal').length) {
// We are uploading a file for an existing addon.
Expand Down

0 comments on commit 828a4cb

Please sign in to comment.