formatting
This commit is contained in:
parent
1f0540f127
commit
ad7439467b
@ -77,7 +77,9 @@ def filter_shipcalls_by_users_assigned_ports(shipcalls:list[model.Shipcall], use
|
|||||||
|
|
||||||
# use the user's id to obtain the matching participant
|
# use the user's id to obtain the matching participant
|
||||||
sentinel = object()
|
sentinel = object()
|
||||||
participant = commands.query_single_or_default(user_participant_query, default=sentinel, model=model.Participant, param={"userid":user_data.get("id")})
|
participant = commands.query_single_or_default(
|
||||||
|
user_participant_query, default=sentinel, model=model.Participant,
|
||||||
|
param={"userid":user_data.get("id")})
|
||||||
if participant is sentinel:
|
if participant is sentinel:
|
||||||
raise Exception(f"could not find a user with id {user_data.get('id')}")
|
raise Exception(f"could not find a user with id {user_data.get('id')}")
|
||||||
shipcalls = filter_shipcalls_by_port(shipcalls, participant)
|
shipcalls = filter_shipcalls_by_port(shipcalls, participant)
|
||||||
|
|||||||
Reference in New Issue
Block a user