removed the 'canceled may not be set on post'-issue.

This commit is contained in:
Max Metz 2024-08-28 13:06:36 +02:00
parent 1be7d68f5c
commit a51b830cf6

View File

@ -58,7 +58,7 @@ class InputValidationShipcall():
InputValidationShipcall.check_participant_list_not_empty_when_user_is_agency(loadedModel) InputValidationShipcall.check_participant_list_not_empty_when_user_is_agency(loadedModel)
# check for reasonable values in the shipcall fields # check for reasonable values in the shipcall fields
InputValidationShipcall.check_shipcall_values(loadedModel, content, forbidden_keys=["canceled", "evaluation", "evaluation_message"]) InputValidationShipcall.check_shipcall_values(loadedModel, content, forbidden_keys=["evaluation", "evaluation_message"]) # "canceled"
return return
@staticmethod @staticmethod
@ -98,7 +98,7 @@ class InputValidationShipcall():
return return
@staticmethod @staticmethod
def check_shipcall_values(loadedModel:dict, content:dict, forbidden_keys:list=["canceled", "evaluation", "evaluation_message"]): def check_shipcall_values(loadedModel:dict, content:dict, forbidden_keys:list=["evaluation", "evaluation_message"]):
""" """
individually checks each value provided in the loadedModel/content. individually checks each value provided in the loadedModel/content.
This function validates, whether the values are reasonable. This function validates, whether the values are reasonable.
@ -248,7 +248,7 @@ class InputValidationShipcall():
raise ValidationError(f"every participant id and type should be listed only once. Found multiple entries for one of the participants.") raise ValidationError(f"every participant id and type should be listed only once. Found multiple entries for one of the participants.")
@staticmethod @staticmethod
def check_forbidden_arguments(content:dict, forbidden_keys=["canceled", "evaluation", "evaluation_message"]): def check_forbidden_arguments(content:dict, forbidden_keys=["evaluation", "evaluation_message"]):
""" """
a post-request must not contain the arguments 'canceled', 'evaluation', 'evaluation_message'. a post-request must not contain the arguments 'canceled', 'evaluation', 'evaluation_message'.
a put-request must not contain the arguments 'evaluation', 'evaluation_message' a put-request must not contain the arguments 'evaluation', 'evaluation_message'