Skip to content

Commit

Permalink
Merge pull request #882 from hubmapconsortium/phillips/status_manager…
Browse files Browse the repository at this point in the history
…_fix

Bugfix: removing check of entity-api fields
  • Loading branch information
sunset666 authored May 29, 2024
2 parents ef02577 + 385b696 commit eba4dfa
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/ingest-pipeline/airflow/dags/status_change/status_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,9 @@ def _set_entity_api_data(self) -> dict:
return response.json()

def _validate_fields_to_change(self):
# TODO: this does basic key checking but should it also try to check value type?
status_found = False
for field in self.fields_to_change.keys():
if field not in self.entity_data.keys():
raise EntityUpdateException(
f"Field {field} is invalid for entity type {self.entity_type}."
)
elif field == "status":
if field == "status":
status_found = True
if status_found:
logging.info("'status' found in update fields, sending to StatusChanger.")
Expand Down Expand Up @@ -249,12 +244,6 @@ def update(self) -> None:
self._set_entity_api_data()

def _validate_fields_to_change(self):
# TODO: this does basic key checking but should it also try to check value type?
for field in self.fields_to_change.keys():
if field not in self.entity_data.keys():
raise EntityUpdateException(
f"Field {field} is invalid for entity type {self.entity_type}."
)
self.fields_to_change["status"] = self.status

def _get_status(self, status: str) -> Optional[Statuses]:
Expand Down

0 comments on commit eba4dfa

Please sign in to comment.