Skip to content

Commit

Permalink
Merge pull request #280 from sennetconsortium/libpitt/278-status
Browse files Browse the repository at this point in the history
Libpitt/278 status
  • Loading branch information
maxsibilla authored Feb 2, 2024
2 parents 20bd6d6 + a830337 commit a1f6e65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/schema/provenance_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ENTITIES:
- validate_application_header_before_property_update
- validate_dataset_status_value
generated: true
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid"
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid|Incomplete"
before_create_trigger: set_dataset_status_new
after_update_trigger: update_dataset_and_ancestors_data_access_level
title:
Expand Down Expand Up @@ -995,7 +995,7 @@ ENTITIES:
- validate_upload_status_value
type: string
generated: true
description: "One of: New|Valid|Invalid|Error|Reorganized|Processing"
description: "One of: New|Valid|Invalid|Error|Reorganized|Processing|Incomplete"
# Trigger method will set the status to "New" on create
before_create_trigger: set_upload_status_new
validation_message:
Expand Down
4 changes: 2 additions & 2 deletions src/schema/schema_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def validate_application_header_before_property_update(property_key, normalized_

def validate_dataset_status_value(property_key, normalized_entity_type, request, existing_data_dict, new_data_dict):
# Use lowercase for comparison
accepted_status_values = ['new', 'processing', 'published', 'qa', 'error', 'hold', 'invalid', 'submitted']
accepted_status_values = ['new', 'processing', 'published', 'qa', 'error', 'hold', 'invalid', 'submitted', 'incomplete']
new_status = new_data_dict[property_key].lower()

if new_status not in accepted_status_values:
Expand Down Expand Up @@ -441,7 +441,7 @@ def validate_retracted_dataset_sub_status_value(property_key, normalized_entity_

def validate_upload_status_value(property_key, normalized_entity_type, request, existing_data_dict, new_data_dict):
# Use lowercase for comparison
accepted_status_values = ['new', 'valid', 'invalid', 'error', 'reorganized', 'processing', 'submitted']
accepted_status_values = ['new', 'valid', 'invalid', 'error', 'reorganized', 'processing', 'submitted', 'incomplete']
new_status = new_data_dict[property_key].lower()

if new_status not in accepted_status_values:
Expand Down

0 comments on commit a1f6e65

Please sign in to comment.