-
-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server and the Parse Flutter SDK.
Issue Description
using set to set a value and then trying to increment or decrement that value will result in removing the value and the amount parameter from the increment or decrement functions will replace it after this point any call to increment or decrement functions will work fine.
Steps to reproduce
- create
ParseObject - set a value
set("key",2) - increment that value using the
setIncrement("key",5)function - get the value using the value key with
get("key") - the result of calling
get("key")is5which is not expected - noteis that 5 is the amount is passed to setIncrement function
code snippet:
final dietPlansObject = ParseObject("Diet_Plans");
dietPlansObject.set("key", 2);
final anyAmount = 5;
dietPlansObject.setIncrement("key", anyAmount);
// dietPlansObject.setDecrement("key", anyAmount);
final value = dietPlansObject.get("key");
print(value); // 5 but it should be 7Actual Outcome
Not considering the already existing value in the first call to setIncrement or setDecrement
Expected Outcome
check for already existing value and use it.
Environment
Parse Flutter SDK
- SDK version:
3.1.15 - Operating system version:
any
Server
- Parse Server version:
any
Logs
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed