aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation
diff options
context:
space:
mode:
authorzsloan2024-08-21 17:17:02 +0000
committerzsloan2024-08-21 17:17:02 +0000
commitb68291da7006b579da7c71c954e96c18d02ddddc (patch)
tree8044589af489c5ef583927a03d958d03ca119955 /gn_auth/auth/authorisation
parentd230cd9d56b585f775def84a8c95b60238ce9f00 (diff)
downloadgn-auth-b68291da7006b579da7c71c954e96c18d02ddddc.tar.gz
Only import anonymous collections if they contain traits
Diffstat (limited to 'gn_auth/auth/authorisation')
-rw-r--r--gn_auth/auth/authorisation/users/collections/views.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gn_auth/auth/authorisation/users/collections/views.py b/gn_auth/auth/authorisation/users/collections/views.py
index eeae91d..f619c3d 100644
--- a/gn_auth/auth/authorisation/users/collections/views.py
+++ b/gn_auth/auth/authorisation/users/collections/views.py
@@ -113,6 +113,7 @@ def import_anonymous() -> Response:
anon_id = UUID(request.json.get("anon_id"))#type: ignore[union-attr]
anon_colls = user_collections(redisconn, User(
anon_id, "anon@ymous.user", "Anonymous User"))
+ anon_colls = tuple(coll for coll in anon_colls if coll['num_members'] > 0)
save_collections(
redisconn,
token.user,