Skip to content

Commit d610cc5

Browse files
committed
MOBILE-1966 glossary: Invalidate categories on PTR
1 parent f9d6dd4 commit d610cc5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

www/addons/mod/glossary/controllers/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ angular.module('mm.addons.mod_glossary')
172172
promises.push(fetchInvalidate.apply(this, args));
173173
promises.push($mmaModGlossary.invalidateCourseGlossaries(courseId));
174174
}
175+
if (glossary && glossary.id) {
176+
promises.push($mmaModGlossary.invalidateCategories(glossary.id));
177+
}
175178

176179
return $q.all(promises).then(function() {
177180
limitFrom = 0;

www/addons/mod/glossary/services/glossary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ angular.module('mm.addons.mod_glossary')
508508
*/
509509
self.invalidateCategories = function(glossaryId, siteId) {
510510
return $mmSitesManager.getSite(siteId).then(function(site) {
511-
return site.invalidateWsCacheForKey(self._getCategoriesCacheKey(glossaryId));
511+
return site.invalidateWsCacheForKey(getCategoriesCacheKey(glossaryId));
512512
});
513513
};
514514

0 commit comments

Comments
 (0)