Prevent firing 500 on attachment name validation

RESOLVED FIXED in Q2 2012

Status

P4
normal
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: zalun, Assigned: zalun)

Tracking

unspecified
Q2 2012
x86
Linux

Details

(Assignee)

Description

7 years ago
Traceback:

Traceback (most recent call last):

[...]

  File "/data/www/builder.addons.mozilla.org/flightdeck/apps/jetpack/views.py", line 770, in rename_attachment
    attachment = revision.update(attachment)

  File "/data/www/builder.addons.mozilla.org/flightdeck/apps/jetpack/models.py", line 902, in update
    return change.increment(self)

  File "/data/www/builder.addons.mozilla.org/flightdeck/apps/jetpack/models.py", line 2321, in increment
    self.save()

  File "/data/www/builder.addons.mozilla.org/flightdeck/apps/base/models.py", line 16, in save
    self.full_clean()

  File "/data/www/builder.addons.mozilla.org/flightdeck/vendor/lib/python/django/db/models/base.py", line 828, in full_clean
    raise ValidationError(errors)

ValidationError: {'ext': [u'Ensure this value has at most 10 characters (it has 16).']}
(Assignee)

Comment 1

6 years ago
I think raising 403 will do the job.
There is a need to search for other raise ValidationError thought.
(Assignee)

Comment 2

6 years ago
r? https://github.com/mozilla/FlightDeck/pull/157

I've added transaction.on_success to the view, but this is still creating a new revision. Check is needed if that is still the case on test server.
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.