Skip to content

Commit fa8ebfb

Browse files
committed
Fix duplicate and mismatched type NODE_FILE(S)_UPDATED
1 parent 1ede6f2 commit fa8ebfb

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

notifications.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,6 @@ notification_types:
462462
template: 'website/templates/file_updated.html.mako'
463463
tests: ['tests/test_events.py']
464464

465-
- name: node_file_updated
466-
subject: 'File Updated'
467-
__docs__: ...
468-
object_content_type_model_name: abstractnode
469-
template: 'website/templates/file_updated.html.mako'
470-
tests: ['tests/test_events.py']
471-
472465
- name: node_institutional_access_request
473466
subject: 'Institutional Access Request'
474467
__docs__: ...

osf/models/notification_type.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class Type(str, Enum):
8383
USER_CROSSREF_DOI_PENDING = 'user_crossref_doi_pending'
8484

8585
# Node notifications
86-
NODE_FILE_UPDATED = 'node_file_updated'
87-
NODE_FILES_UPDATED = 'node_files_updated'
86+
NODE_FILE_UPDATED = 'node_files_updated'
8887
NODE_AFFILIATION_CHANGED = 'node_affiliation_changed'
8988
NODE_REQUEST_ACCESS_SUBMITTED = 'node_request_access_submitted'
9089
NODE_REQUEST_ACCESS_DENIED = 'node_request_access_denied'

tests/test_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def setUp(self):
309309
self.file_sub = factories.NotificationSubscriptionFactory(
310310
object_id=self.project.id,
311311
content_type=ContentType.objects.get_for_model(self.project),
312-
notification_type=NotificationType.objects.get(name=NotificationType.Type.NODE_FILES_UPDATED)
312+
notification_type=NotificationType.objects.get(name=NotificationType.Type.NODE_FILE_UPDATED)
313313
)
314314
self.file_sub.save()
315315

@@ -407,7 +407,7 @@ def setUp(self):
407407
self.file_sub = factories.NotificationSubscriptionFactory(
408408
object_id=self.project.id,
409409
content_type=ContentType.objects.get_for_model(self.project),
410-
notification_type=NotificationType.objects.get(name=NotificationType.Type.NODE_FILES_UPDATED)
410+
notification_type=NotificationType.objects.get(name=NotificationType.Type.NODE_FILE_UPDATED)
411411
)
412412
self.file_sub.save()
413413

0 commit comments

Comments
 (0)