Files
kami-parse-server/src/Adapters/Storage/Postgres
Tyson Andre 83a0d7b685 Fix "undefined property '__op'" in postgres update (#4541)
* Fix "undefined property '__op'" in postgres update

This causes a TypeError which becomes a regular Error,
before the update can be issued. (I think)

This happens when there is an object schema,
and there is also an unrelated field in originalUpdate
which is null or undefined.

e.g. when 'location' is a mandatory object in postgres,
and 'middleName' is an optional string,
PostgresStorageAdapter would throw when a query similar
to the below was performed:
(Object.keys(originalUpdate) would include "middleName" as a value of `k`)

    query.set('location', {'country': 'US'})
    query.set('middleName', undefined);

* Fix lint error
2018-02-07 08:16:54 -05:00
..
2017-02-18 14:26:25 -05:00