Skip to content

Commit 9283f82

Browse files
committed
MOBILE-2178 database: Don't save offline if fieldnotifications
1 parent ec33b4a commit 9283f82

File tree

1 file changed

+2
-12
lines changed
  • www/addons/mod/data/services

1 file changed

+2
-12
lines changed

www/addons/mod/data/services/data.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,7 @@ angular.module('mm.addons.mod_data')
622622
params.groupid = groupId;
623623
}
624624

625-
return site.write('mod_data_add_entry', params).then(function(result) {
626-
if (result.newentryid) {
627-
return result;
628-
}
629-
return $q.reject();
630-
}).catch(function(error) {
625+
return site.write('mod_data_add_entry', params).catch(function(error) {
631626
return $q.reject({
632627
error: error,
633628
wserror: $mmUtil.isWebServiceError(error)
@@ -766,12 +761,7 @@ angular.module('mm.addons.mod_data')
766761
data: data
767762
};
768763

769-
return site.write('mod_data_update_entry', params).then(function(result) {
770-
if (result.updated) {
771-
return result;
772-
}
773-
return $q.reject();
774-
}).catch(function(error) {
764+
return site.write('mod_data_update_entry', params).catch(function(error) {
775765
return $q.reject({
776766
error: error,
777767
wserror: $mmUtil.isWebServiceError(error)

0 commit comments

Comments
 (0)