mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
prevent sync from clearing selected tags (#7631)
* prevent sync from clearing selected tags * improved tag selection bugfix
This commit is contained in:
committed by
Matteo Pagliazzi
parent
0bf7858d53
commit
539547b39e
@@ -80,6 +80,10 @@ angular.module('habitrpg')
|
||||
|
||||
_.extend(user, response.data.data);
|
||||
|
||||
if (!user.filters) {
|
||||
user.filters = {};
|
||||
}
|
||||
|
||||
if (!user._wrapped) {
|
||||
// This wraps user with `ops`, which are functions shared both on client and mobile. When performed on client,
|
||||
// they update the user in the browser and then send the request to the server, where the same operation is
|
||||
|
||||
@@ -13,6 +13,7 @@ schema.plugin(baseModel, {
|
||||
private: ['auth.local.hashed_password', 'auth.local.salt', '_cronSignature'],
|
||||
toJSONTransform: function userToJSON (plainObj, originalDoc) {
|
||||
plainObj._tmp = originalDoc._tmp; // be sure to send down drop notifs
|
||||
delete plainObj.filters;
|
||||
|
||||
return plainObj;
|
||||
},
|
||||
|
||||
@@ -107,10 +107,6 @@ let schema = new Schema({
|
||||
},
|
||||
|
||||
balance: {type: Number, default: 0},
|
||||
// Not saved on the user right now
|
||||
filters: {type: Schema.Types.Mixed, default: () => {
|
||||
return {};
|
||||
}},
|
||||
|
||||
purchased: {
|
||||
ads: {type: Boolean, default: false},
|
||||
|
||||
Reference in New Issue
Block a user