Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update _updated timestamp when modifing item highlights #2412

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/highlights/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def create(self, docs, **kwargs):
highlights = [h for h in highlights if h != doc["highlights"]]
highlight_on = False # highlight toggled off

updates = {"highlights": highlights, "_updated": item["_updated"], "_etag": item["_etag"]}
updates = {"highlights": highlights, "_etag": item["_etag"]}
service.update(item["_id"], updates, item)

publishedItems = publishedService.find({"item_id": item["_id"]})
Expand Down
5 changes: 2 additions & 3 deletions features/highlights.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Feature: Highlights
{"_items": [{"name": "highlight changed", "desks": ["#desks._id#"], "groups": ["group one", "group two"]}]}
"""


@auth
Scenario: Mark item for highlights
Given "desks"
Expand Down Expand Up @@ -113,7 +112,7 @@ Feature: Highlights
Then we get list with 1 items
"""
{"_items": [{"headline": "test", "highlights": ["#highlights._id#"],
"_updated": "#archive._updated#", "_etag": "#archive._etag#"}]}
"_etag": "#archive._etag#"}]}
"""

When we post to "marked_for_highlights"
Expand All @@ -123,7 +122,7 @@ Feature: Highlights
And we get "archive"
Then we get list with 1 items
"""
{"_items": [{"highlights": [], "_updated": "#archive._updated#", "_etag": "#archive._etag#"}]}
{"_items": [{"highlights": [], "_etag": "#archive._etag#"}]}
"""

@auth
Expand Down