Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1510 closed defect (fixed)

Add validations for gpx upload

Reported by: Thomas Wood Owned by: Thomas Wood
Priority: major Milestone: OSM 0.6
Component: website Version:
Keywords: Cc:

Description

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 Thomas Wood

Milestone: OSM 0.6
Owner: changed from Tom Hughes to Thomas Wood
Status: newassigned

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: fixed
Status: assignedclosed

(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 Thomas Wood

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.