bugfix for shipcall PUT validation
This commit is contained in:
parent
fb8b732b1d
commit
11098da25b
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user