mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 14:02:24 +01:00
Fix SQLAlchemy error by using ids not mapped instances
This commit is contained in:
parent
f81b7523d4
commit
6a64f3f24d
@ -88,7 +88,7 @@ def add_notification(target, causer: User, type: NotificationType, title: str, u
|
|||||||
|
|
||||||
if target.rank.at_least(UserRank.NEW_MEMBER) and target != causer:
|
if target.rank.at_least(UserRank.NEW_MEMBER) and target != causer:
|
||||||
session.query(Notification) \
|
session.query(Notification) \
|
||||||
.filter_by(user=target, causer=causer, type=type, title=title, url=url, package=package) \
|
.filter_by(user_id=target.id, causer_id=causer.id, type=type, title=title, url=url, package_id=package.id) \
|
||||||
.delete()
|
.delete()
|
||||||
notif = Notification(target, causer, type, title, url, package)
|
notif = Notification(target, causer, type, title, url, package)
|
||||||
session.add(notif)
|
session.add(notif)
|
||||||
|
Loading…
Reference in New Issue
Block a user