mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
packages/django-channels-postgres/layer: fix query when subscribed to multiple channels (cherry-pick #18152 to version-2025.10) (#18153)
packages/django-channels-postgres/layer: fix query when subscribed to multiple channels (#18152) Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
committed by
GitHub
parent
445fa31b57
commit
db35593b24
@@ -473,7 +473,7 @@ class PostgresChannelLayerReceiver:
|
||||
"""
|
||||
DELETE
|
||||
FROM {table}
|
||||
WHERE {table}.{channel} IN (%s)
|
||||
WHERE {table}.{channel} = ANY(%s)
|
||||
AND {table}.{expires} >= %s
|
||||
RETURNING {table}.{id}, {table}.{channel}, {table}.{message}
|
||||
"""
|
||||
@@ -484,7 +484,7 @@ class PostgresChannelLayerReceiver:
|
||||
expires=sql.Identifier("expires"),
|
||||
message=sql.Identifier("message"),
|
||||
),
|
||||
(tuple(self._subscribed_to), now()),
|
||||
(list(self._subscribed_to), now()),
|
||||
)
|
||||
async for row in cursor:
|
||||
message_id, channel, message = row
|
||||
|
||||
Reference in New Issue
Block a user