Skip to content

MongoDB > v3.0: skip' field must be numeric. #77

Closed
@cupofnestor

Description

@cupofnestor

I'm attempting to dockerize my fng projects. When using fng with the latest mongodb, attempting to 'list' my models returns the error:

Invalid query

Failed to parse: { find: "leaders", filter: {}, projection: {}, skip: {}, limit: 60 }. 'skip' field must be numeric.

I tracked this down to an assertion in forms-angular.js:

if (value && value !== ''  ) {
     ///build querystring
}

If the skip parameter happens to be 0 (Boolean(0) == false), this assertion will fail, and no skip parameter will be added to the querystring. I modified the assertion and the error is gone:

if (value && value !== '' || typeof(value) == "number" ) {
     ///build querystring
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions