Skip to content

Commit

Permalink
#789: ensure we dont kick into recovery mode when id and key are the …
Browse files Browse the repository at this point in the history
…same field
  • Loading branch information
JoernBerkefeld committed Mar 28, 2023
1 parent c0a18f0 commit da56388
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/metadataTypes/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,11 @@ class Interaction extends MetadataType {
metadata[metadataKey][this.definition.keyField]
);
// Update if it already exists; Create it if not
if (Util.logger.level === 'debug' && metadata[metadataKey][this.definition.idField]) {
if (
Util.logger.level === 'debug' &&
metadata[metadataKey][this.definition.idField] &&
this.definition.idField !== this.definition.keyField
) {
// TODO: re-evaluate in future releases if & when we managed to solve folder dependencies once and for all
// only used if resource is excluded from cache and we still want to update it
// needed e.g. to rewire lost folders
Expand Down
6 changes: 5 additions & 1 deletion lib/metadataTypes/MetadataType.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,11 @@ class MetadataType {
metadata[metadataKey][this.definition.keyField]
);
// Update if it already exists; Create it if not
if (Util.logger.level === 'debug' && metadata[metadataKey][this.definition.idField]) {
if (
Util.logger.level === 'debug' &&
metadata[metadataKey][this.definition.idField] &&
this.definition.idField !== this.definition.keyField
) {
// TODO: re-evaluate in future releases if & when we managed to solve folder dependencies once and for all
// only used if resource is excluded from cache and we still want to update it
// needed e.g. to rewire lost folders
Expand Down

0 comments on commit da56388

Please sign in to comment.