This commit is contained in:
committed by
Florent Vilmart
parent
4b5fb84678
commit
45ff23bde2
@@ -1442,7 +1442,10 @@ export class PostgresStorageAdapter implements StorageAdapter {
|
|||||||
|
|
||||||
for (const fieldName in update) {
|
for (const fieldName in update) {
|
||||||
const fieldValue = update[fieldName];
|
const fieldValue = update[fieldName];
|
||||||
if (fieldValue === null) {
|
// Drop any undefined values.
|
||||||
|
if (typeof fieldValue === 'undefined') {
|
||||||
|
delete update[fieldName];
|
||||||
|
} else if (fieldValue === null) {
|
||||||
updatePatterns.push(`$${index}:name = NULL`);
|
updatePatterns.push(`$${index}:name = NULL`);
|
||||||
values.push(fieldName);
|
values.push(fieldName);
|
||||||
index += 1;
|
index += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user