MOBILE-4270 data: Catch errors when deleting
parent
7fb0c2be47
commit
479dac66a1
|
@ -714,7 +714,9 @@ export class AddonModDataHelperProvider {
|
|||
courseId = await this.getActivityCourseIdIfNotSet(dataId, courseId, siteId);
|
||||
}
|
||||
|
||||
AddonModData.deleteEntry(dataId, entryId, courseId!, siteId);
|
||||
if (courseId) {
|
||||
await AddonModData.deleteEntry(dataId, entryId, courseId, siteId);
|
||||
}
|
||||
} catch (message) {
|
||||
CoreDomUtils.showErrorModalDefault(message, 'addon.mod_data.errordeleting', true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue