bugfix for shipcall PUT validation

This commit is contained in:
Daniel Schick 2024-10-16 16:16:54 +02:00
parent c0902c65ee
commit 401e0d4ae8
2 changed files with 92 additions and 93 deletions

View File

@ -115,7 +115,7 @@ def get_assigned_participant_of_type(shipcall_id:int, participant_type:typing.Un
"""obtains the ShipcallParticipantMap of a given shipcall and finds the participant id of a desired type. Finally, returns the respective Participant"""
spm_shipcall_data = execute_sql_query_standalone(
query=SQLQuery.get_shipcall_participant_map_by_shipcall_id_and_type(),
param={"id":shipcall_id, "type":participant_type},
param={"id":shipcall_id, "type":int(participant_type)},
command_type="query") # returns a list of matches
if len(spm_shipcall_data)==0:

View File

@ -521,7 +521,7 @@ class InputValidationShipcall():
### USER authority ###
# determine, whether the user is a) the assigned agency or b) a BSMD participant
user_is_assigned_agency = (user_participant_id == assigned_agency.participant_id)
user_is_assigned_agency = (user_participant_id == assigned_agency.id)
# when the BSMD flag is set: the user must be either BSMD or the assigned agency
# when the BSMD flag is not set: the user must be the assigned agency
@ -537,4 +537,3 @@ class InputValidationShipcall():
return