Skip to content

Commit

Permalink
Status fix for projects with dates that could have been closed or abo…
Browse files Browse the repository at this point in the history
…rted
  • Loading branch information
aanil committed Jun 20, 2024
1 parent a4376ff commit 6e654b2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions daily_read/ngi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,13 @@ def __init__(
else:
self.status = latest_statuses[0]
else:
log.info(f"No project dates found for {project_id}, so setting its status to Pending")
self.status = "Pending"
log.info(f"No project dates found for {project_id}, trying to find status from internal_proj_status")
if internal_proj_status in ["Pending", "Aborted", "Closed"]:
self.status = internal_proj_status
else:
log.error(
f"ERROR! No project dates or incorrect internal_proj_status found for {project_id}, no status set!"
)

@property
def internal_id_or_portal_id(self):
Expand Down

0 comments on commit 6e654b2

Please sign in to comment.