Skip to content

Commit 0313194

Browse files
removed substatus from entity-api-spec and removed related validator
1 parent 9b9ba68 commit 0313194

2 files changed

Lines changed: 0 additions & 28 deletions

File tree

entity-api-spec.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,6 @@ components:
793793
type: string
794794
format: uuid
795795
description: 'The thumbnail image file previously uploaded to delete. Provide as a string of the file_uuid like: "c35002f9c3d49f8b77e1e2cd4a01803d"'
796-
sub_status:
797-
type: string
798-
description: 'A sub-status provided to further define the status. The only current allowable value is "Retracted"'
799796
retraction_reason:
800797
type: string
801798
description: 'Information recorded about why a the dataset was retracted.'

src/schema/schema_validators.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -530,31 +530,6 @@ def validate_retraction_reason_provided(property_key, normalized_entity_type, re
530530
raise ValueError("Missing retraction_reason field when sub_status is provided")
531531

532532

533-
"""
534-
Validate the provided value of Dataset.sub_status on update via PUT
535-
536-
Parameters
537-
----------
538-
property_key : str
539-
The target property key
540-
normalized_type : str
541-
Submission
542-
request: Flask request object
543-
The instance of Flask request passed in from application request
544-
existing_data_dict : dict
545-
A dictionary that contains all existing entity properties
546-
new_data_dict : dict
547-
The json data in request body, already after the regular validations
548-
"""
549-
def validate_retracted_dataset_sub_status_value(property_key, normalized_entity_type, request, existing_data_dict, new_data_dict):
550-
# Use lowercase for comparison
551-
accepted_sub_status_values = ['retracted']
552-
sub_status = new_data_dict[property_key].lower()
553-
554-
if sub_status not in accepted_sub_status_values:
555-
raise ValueError("Invalid sub_status value of the Dataset to be retracted")
556-
557-
558533
"""
559534
Validate the provided value of Upload.status on update via PUT
560535

0 commit comments

Comments
 (0)