uchicago-cs / chigame

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Fixed the bug in NotificationQuerySet.get_by_actor() and added tests #337

Closed omarelkashef closed 9 months ago

omarelkashef commented 9 months ago

Fixed the bug where in NotificationQuerySet.get_by_actor(), get() is used to retrieve a Notification and then is_not_deleted() is called on the return value of the get() which is a Notification object while is_not_deleted() is a method of NotificationQuerySet not Notification. I added conditional logic that raises an exception if no notification matching criteria was found and also added tests that cover the fixed bug.

omarelkashef commented 9 months ago

Closing Statement: the bug is fixed by using the appropriate method and now it raises an exception if no notification matches the criteria. Tests were added to cover this logic.

elizabethli31 commented 9 months ago

Issue Score: Excellent

Comments: Same as issue comment - I'm marking this as minor, but great job!