fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

add phase model to the CipPlannerView #90

Closed smcalilly closed 2 years ago

smcalilly commented 2 years ago

Overview

Fixes the CIP Planner, which was broken after we added the new Phase model. There's no issue for this.

Demo

cip-planner-fix

This demo only works because my local database had existing Phase data that I created when working on PR #84.

Notes

Is there a better way to deal with the Project/Phase relationships using the ORM? select_related and prefetch_related wouldn't work, so I ended up querying it like this code implementation. Seems like that would be inefficient with a ton of unnecessary database queries?

Testing Instructions

smcalilly commented 2 years ago

@fgregg nice! changed here: fae9e06