mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
handle uselist=False in our relationship expiry
This commit is contained in:
@@ -634,7 +634,10 @@ def _expire_relationship(target, relationship_prop):
|
|||||||
return
|
return
|
||||||
# many-to-many and one-to-many have a list of peers
|
# many-to-many and one-to-many have a list of peers
|
||||||
# many-to-one has only one
|
# many-to-one has only one
|
||||||
if relationship_prop.direction is interfaces.MANYTOONE:
|
if (
|
||||||
|
relationship_prop.direction is interfaces.MANYTOONE
|
||||||
|
or not relationship_prop.uselist
|
||||||
|
):
|
||||||
peers = [peers]
|
peers = [peers]
|
||||||
for obj in peers:
|
for obj in peers:
|
||||||
if inspect(obj).persistent:
|
if inspect(obj).persistent:
|
||||||
|
Reference in New Issue
Block a user