This commit is contained in:
Matteo Pagliazzi
2020-03-01 22:21:53 +01:00
parent 979d0c519d
commit c5208f0ef6
4 changed files with 67 additions and 0 deletions

View File

@@ -9,6 +9,9 @@ import {
import {
model as PushDevice,
} from '../pushDevice';
import {
model as Tag,
} from '../tag';
import { // eslint-disable-line import/no-cycle
userActivityWebhook,
} from '../../libs/webhook';
@@ -198,6 +201,11 @@ schema.post('init', function postInitUser () {
this.pushDevices = PushDevice.cleanupCorruptData(this.pushDevices);
}
// Make sure tags are loaded
if (this.isDirectSelected('tags')) {
this.tags = Tag.cleanupCorruptData(this.tags);
}
return true;
});