Skip to content

Commit fd1caf1

Browse files
committed
Fixed round import for notifications
1 parent 42e45e9 commit fd1caf1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/PyMatcha/models/notification.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from datetime import datetime
2323
from typing import Optional
2424

25-
from PyMatcha.models.user import User
2625
from PyMatcha.utils import create_notifications_table
2726
from PyMatcha.utils.orm import Field
2827
from PyMatcha.utils.orm import Model
@@ -53,7 +52,9 @@ def create(
5352
raise ValueError(
5453
"type must be one of ['match', 'like', 'superlike', 'unlike', 'view', 'message', 'message_like']"
5554
)
56-
blocked_ids = [block.blocked_id for block in User.get(id=user_id).get_blocks()]
55+
from PyMatcha.models.user import get_user # noqa
56+
57+
blocked_ids = [block.blocked_id for block in get_user(user_id).get_blocks()]
5758
if trigger_id in blocked_ids:
5859
return None
5960
new_notif = Notification(

0 commit comments

Comments
 (0)