Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1510 closed defect (fixed)

Add validations for gpx upload

Reported by: grand.edgemaster@… Owned by: grand.edgemaster@…
Priority: major Milestone: OSM 0.6
Component: website Version:
Keywords: Cc:


In create:
Check for user on upload.

In api_create:
Check that the file is provided.

Change History (4)

comment:1 Changed 10 years ago by grand.edgemaster@…

  • Milestone set to OSM 0.6
  • Owner changed from tom@… to grand.edgemaster@…
  • Status changed from new to assigned

comment:2 Changed 10 years ago by edgemaster

(In [13321]) Require auth on calls to /trace/create, and pass through to form if called without params. Adjust validations on traces to prevent dual error messages on description (validates_presence_of catches the empty string removed from length validation)
More changes to come for api_create
References #1510

comment:3 Changed 10 years ago by edgemaster

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13331]) Set params to sane defaults if unset by client.
Reject creates with no file with 400, model validations will also reject with 400 (as was existing but broken behaviour)
Closes #1510

comment:4 Changed 10 years ago by grand.edgemaster@…

For the context of any future reviews errors such as the following would occur without the appropriate parameters to api_create:

NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split):
    /app/models/trace.rb:27:in `tagstring='
Note: See TracTickets for help on using tickets.