You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is happening on the development branch, right? If so it'll soon get back to normal, as there's currently a WIP to support bulk inserts (bulk inserts are working already, but validation is ignored). The stable branch (master) should hopefully be immune to this behavior.
I submit a record that gets rejected by the validator -- but then, the record is inserted into MongoDB anyway.
gella:~ maksim$ curl -d 'item1={"username":"bobama", "firstname": "barack", "lastname": "2"}' 127.0.0.1:5000/people/
{"item1": {"status": "ERR", "issues": ["min length for field 'username' is 8"]}}
gella:~ maksim$ curl -d 'item1={"username":"bobama", "firstname": "barack", "lastname": "2"}' 127.0.0.1:5000/people/
{"item1": {"status": "ERR", "issues": ["min length for field 'username' is 8", "value 'bobama' for field 'username' not unique"]}}
In both cases, the inserts have failed. However, I list the records and get ….
{
"firstname": "barack",
"_links": {
"self": {
"href": "127.0.0.1:5000/people/518ab5cfe584f144b095c4bf/",
"title": "person"
}
},
"username": "bobama",
"updated": "Thu, 01 Jan 1970 00:00:00 UTC",
"lastname": "2",
"_id": "518ab5cfe584f144b095c4bf",
"created": "Thu, 01 Jan 1970 00:00:00 UTC",
"etag": "493ca13f6a2fbad1f11f321231aa8e0fab6bd0c0"
},
{
"firstname": "barack",
"_links": {
"self": {
"href": "127.0.0.1:5000/people/518ab5e0e584f144b095c4c0/",
"title": "person"
}
},
"username": "bobama",
"updated": "Thu, 01 Jan 1970 00:00:00 UTC",
"lastname": "2",
"_id": "518ab5e0e584f144b095c4c0",
"created": "Thu, 01 Jan 1970 00:00:00 UTC",
"etag": "dbc132dc64baae2bf0b3ff8b12f1d9dcff6ec4dc"
},
{
"firstname": "barack",
"_links": {
"self": {
"href": "127.0.0.1:5000/people/518ab5e9e584f144b8bb5405/",
"title": "person"
}
},
"username": "bobama",
"updated": "Thu, 01 Jan 1970 00:00:00 UTC",
"lastname": "2",
"_id": "518ab5e9e584f144b8bb5405",
"created": "Thu, 01 Jan 1970 00:00:00 UTC",
"etag": "75e0c4b68bc65612ddb591a8dc612191efc44e88"
}
i.e. all 3 inserts have gone through despite failing validators.
The text was updated successfully, but these errors were encountered: