Skip to content

Conversation

@cslzchen
Copy link
Collaborator

@cslzchen cslzchen commented Jan 19, 2026

Ticket

Purpose

Create global_file_updated, global_reviews and node_files_updated subscriptions if missing

  • Use USER_FILE_UPDATED for group _global_file_updated
  • Use REVIEWS_SUBMISSION_STATUS for group _global_reviews
  • Use NODE_FILE_UPDATED for group _node_files_updated

In addition, added _is_digest=True for newly created OSF users's default subscriptions

Changes

See dfif

Side Effects

N/A

QE Notes

N/A

CE Notes

N/A

Documentation

N/A

Copy link
Collaborator

@Ostap-Zherebetskyi Ostap-Zherebetskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎆

@cslzchen cslzchen changed the title [ENG-10080] Create global_file_updated and global_reviews subscriptions if missing [ENG-10080] Create global_file_updated, global_reviews and node_files_updated subscriptions if missing Jan 20, 2026
Comment on lines 200 to 202
existing_subscriptions = annotated_obj_qs.filter(legacy_id=subscription_id)
except ObjectDoesNotExist:
raise NotFound
# `global_file_updated` and `global_reviews` should exist by default for every user
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized ObjectDoesNotExist won't be throw here, need to move the creation part out of the try/except.

),
)
existing_subscriptions = annotated_obj_qs.filter(legacy_id=subscription_id)
if not existing_subscriptions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not existing_subscriptions:
if not existing_subscriptions.exists():

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants