mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Updated task model to allow setting streak (#7306)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
cfb5e2be60
commit
dbd6daeca0
@@ -56,7 +56,7 @@ export let TaskSchema = new Schema({
|
||||
}, discriminatorOptions));
|
||||
|
||||
TaskSchema.plugin(baseModel, {
|
||||
noSet: ['challenge', 'userId', 'completed', 'history', 'streak', 'dateCompleted', 'completed'],
|
||||
noSet: ['challenge', 'userId', 'completed', 'history', 'dateCompleted', 'completed'],
|
||||
sanitizeTransform (taskObj) {
|
||||
if (taskObj.type && taskObj.type !== 'reward') { // value should be settable directly only for rewards
|
||||
delete taskObj.value;
|
||||
|
||||
Reference in New Issue
Block a user