Browse Source

Fix problem tag updates not saved

master
Menci 6 years ago
parent
commit
152284721a
  1. 4
      models/problem.ts

4
models/problem.ts

@ -478,8 +478,6 @@ export default class Problem extends Model {
} }
async setTags(newTagIDs) { async setTags(newTagIDs) {
problemTagCache.set(this.id, newTagIDs);
let oldTagIDs = (await this.getTags()).map(x => x.id); let oldTagIDs = (await this.getTags()).map(x => x.id);
let delTagIDs = oldTagIDs.filter(x => !newTagIDs.includes(x)); let delTagIDs = oldTagIDs.filter(x => !newTagIDs.includes(x));
@ -504,6 +502,8 @@ export default class Problem extends Model {
await map.save(); await map.save();
} }
problemTagCache.set(this.id, newTagIDs);
} }
async changeID(id) { async changeID(id) {

Loading…
Cancel
Save