Skip to content

Bugfix save and create object / LiveQuery #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/network/parse_live_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class LiveQuery {
if (_debug) {
print('$_printConstLiveQuery: Done');
}
}, onError: (Error error) {
}, onError: (error) {
if (_debug) {
print(
'$_printConstLiveQuery: Error: ${error.runtimeType.toString()}');
Expand Down
4 changes: 2 additions & 2 deletions lib/src/objects/parse_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ParseObject extends ParseBase implements ParseCloneable {
Future<ParseResponse> create() async {
try {
final Uri url = getSanitisedUri(_client, '$_path');
final String body = json.encode(toJson());
final String body = json.encode(toJson(forApiRQ: true);
final Response result = await _client.post(url, body: body);

//Set the objectId on the object after it is created.
Expand All @@ -89,7 +89,7 @@ class ParseObject extends ParseBase implements ParseCloneable {
} else {
try {
final Uri url = getSanitisedUri(_client, '$_path/$objectId');
final String body = json.encode(toJson());
final String body = json.encode(toJson(forApiRQ: true));
final Response result = await _client.put(url, body: body);
return handleResponse<ParseObject>(
this, result, ParseApiRQ.save, _debug, className);
Expand Down