diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-17 15:33:11 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-17 15:33:11 +0200 |
commit | 94d2595281d8c992dfad37518d9677827541ed6c (patch) | |
tree | 16f23abe86bf670664c7326a0b9d3b33d4537c0c | |
parent | 93c9ebb5d0654626cb8bf2e6b00a5845b210f82c (diff) | |
download | sink-94d2595281d8c992dfad37518d9677827541ed6c.tar.gz sink-94d2595281d8c992dfad37518d9677827541ed6c.zip |
Caught another case of empty uid in readEntity
-rw-r--r-- | common/datastorequery.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp index 276a10a..f1b0ed2 100644 --- a/common/datastorequery.cpp +++ b/common/datastorequery.cpp | |||
@@ -345,8 +345,11 @@ public: | |||
345 | //Redo the reduction to find new aggregated values | 345 | //Redo the reduction to find new aggregated values |
346 | auto selectionResult = reduceOnValue(reductionValue); | 346 | auto selectionResult = reduceOnValue(reductionValue); |
347 | 347 | ||
348 | //TODO if old and new are the same a modification would be enough | ||
349 | auto oldSelectionResult = mSelectedValues.take(reductionValueBa); | 348 | auto oldSelectionResult = mSelectedValues.take(reductionValueBa); |
349 | //If mSelectedValues did not containthe value, oldSelectionResult will be empty.(Happens if entites have been filtered) | ||
350 | if (oldSelectionResult.isEmpty()) { | ||
351 | return; | ||
352 | } | ||
350 | if (oldSelectionResult == selectionResult.selection) { | 353 | if (oldSelectionResult == selectionResult.selection) { |
351 | mSelectedValues.insert(reductionValueBa, selectionResult.selection); | 354 | mSelectedValues.insert(reductionValueBa, selectionResult.selection); |
352 | Q_ASSERT(!selectionResult.selection.isEmpty()); | 355 | Q_ASSERT(!selectionResult.selection.isEmpty()); |