Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bertrand PINEL
ember-aws-ehipster
Commits
a7b2aeac
Commit
a7b2aeac
authored
Dec 27, 2018
by
Bertrand PINEL
Browse files
Small update to cope with empty attributes not to persist n DynamoDB
parent
45305ad8
Changes
2
Hide whitespace changes
Inline
Side-by-side
cloud/lambda-jsonapi-test.js
View file @
a7b2aeac
...
...
@@ -169,7 +169,9 @@ function generateRowId(subid) {
};
// Adding attributes as column in dynamoDb
for
(
var
prop
in
attrs
)
{
content
[
prop
]
=
attrs
[
prop
];
if
(
attrs
[
prop
]
!=
null
&&
attrs
[
prop
].
length
>
0
)
// Empty field cannot be persisted
content
[
prop
]
=
attrs
[
prop
];
}
// Dealing with relationships if any
if
(
relations
){
...
...
cloud/lambda/lambda-jsonapi.js
View file @
a7b2aeac
...
...
@@ -160,7 +160,9 @@ function generateRowId(subid) {
};
// Adding attributes as column in dynamoDb
for
(
var
prop
in
attrs
)
{
content
[
prop
]
=
attrs
[
prop
];
if
(
attrs
[
prop
]
!=
null
&&
attrs
[
prop
].
length
>
0
)
// Empty field cannot be persisted
content
[
prop
]
=
attrs
[
prop
];
}
// Dealing with relationships if any
if
(
relations
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment