File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
www/addons/mod/data/services Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments