Skip to content

Commit

Permalink
feat: added group_by_id field in notifications model (#35137)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadadeeltajamul authored Jul 23, 2024
1 parent 7ae80be commit e12ec1b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,7 @@
############## NOTIFICATIONS EXPIRY ##############
NOTIFICATIONS_EXPIRY = 60
EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000
NOTIFICATION_CREATION_BATCH_SIZE = 83
NOTIFICATION_CREATION_BATCH_SIZE = 76

############################ AI_TRANSLATIONS ##################################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'
Expand Down
2 changes: 1 addition & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5382,7 +5382,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
############## NOTIFICATIONS ##############
NOTIFICATIONS_EXPIRY = 60
EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000
NOTIFICATION_CREATION_BATCH_SIZE = 83
NOTIFICATION_CREATION_BATCH_SIZE = 76
NOTIFICATIONS_DEFAULT_FROM_EMAIL = "[email protected]"
NOTIFICATION_TYPE_ICONS = {}
DEFAULT_NOTIFICATION_ICON_URL = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.13 on 2024-07-23 07:59

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('notifications', '0005_notification_email_notification_web'),
]

operations = [
migrations.AddField(
model_name='notification',
name='group_by_id',
field=models.CharField(db_index=True, default='', max_length=42),
),
]
1 change: 1 addition & 0 deletions openedx/core/djangoapps/notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class Notification(TimeStampedModel):
email = models.BooleanField(default=False, null=False, blank=False)
last_read = models.DateTimeField(null=True, blank=True)
last_seen = models.DateTimeField(null=True, blank=True)
group_by_id = models.CharField(max_length=42, db_index=True, null=False, default="")

def __str__(self):
return f'{self.user.username} - {self.course_id} - {self.app_name} - {self.notification_type}'
Expand Down

0 comments on commit e12ec1b

Please sign in to comment.