Skip to content

Commit

Permalink
Fix overcaching annotations.
Browse files Browse the repository at this point in the history
This was caused by #978.
  • Loading branch information
manthey committed Oct 19, 2022
1 parent 1a7ba44 commit a6e68f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.17.2

### Bug Fixes
- Fixed overcaching annotations ([#983](../../pull/983))

## 1.17.1

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ let AnnotationModel = AccessControlledModel.extend({
var restOpts = {
url: (this.altUrl || this.resourceName) + '/' + this.get('_id'),
/* Add our region request into the query */
data: this._region
data: Object.assign({}, this._region, {_: (this.get('updated') || this.get('created')) + '_' + this.get('_version')})
};
if (opts.extraPath) {
restOpts.url += '/' + opts.extraPath;
Expand Down Expand Up @@ -280,6 +280,7 @@ let AnnotationModel = AccessControlledModel.extend({
} else {
url = `annotation/${this.id}`;
method = 'PUT';
this.attributes.updated = '' + Date.now(); // eslint-disable-line backbone/no-model-attributes
}

if (this._pageElements === false || isNew) {
Expand Down

0 comments on commit a6e68f1

Please sign in to comment.