Skip to content

Commit c698bd6

Browse files
committed
MOBILE-2178 database: Allow editing offline entries in offline
1 parent 57fec3f commit c698bd6

File tree

1 file changed

+5
-1
lines changed
  • www/addons/mod/data/services

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,11 @@ angular.module('mm.addons.mod_data')
680680
}).then(function() {
681681
if (justAdded) {
682682
// The field was added offline, add again and stop.
683-
return self.addEntry(dataId, entryId, courseId, contents, groupId, fields, siteId, forceOffline);
683+
return self.addEntry(dataId, entryId, courseId, contents, groupId, fields, siteId, forceOffline)
684+
.then(function(result) {
685+
result.updated = true;
686+
return result;
687+
});
684688
}
685689

686690
if (!$mmApp.isOnline() || forceOffline) {

0 commit comments

Comments
 (0)