NASA-IMPACT / admg-backend

Apache License 2.0
2 stars 0 forks source link

Correctly display related draft status #581

Closed alukach closed 10 months ago

alukach commented 10 months ago

What I'm Changing

I noticed that we were displaying the incorrect label on the Status column. The color of the third record demonstrates an "In Progress" draft, however the wording states that it's published.

Before

image

After

image

How I did it

This occurred because we were displaying the status of the canonical draft, which is not necessarily the latest draft. We're using the latest_status value to store the status of the latest draft, so we can use that to determine the display string for that status.

https://github.com/NASA-IMPACT/admg-backend/blob/03687abf9117cdf6fb4fe211461f105f8785134e/app/admin_ui/tables/tables.py#L153