panoptes
panoptes copied to clipboard
Project cache doesn't invalidate when creating a workflow
So, @mrniaboc has this presentation where he does the following things:
- create a new project
- upload a bg image
- upload 3 subjects
- create a new workflow with a single question task
- link the subject set
- click on view project
Doing that in this particular order means that the project JSON cache is filled when you upload the bg image. The JSON cache includes the default workflow, which will be null at that point because there are no workflows yet.
Then when you click "View Project", you get that cached JSON, which means the frontend doesn't get the workflow that was just made, and the classifier interface breaks on that (gets stuck on "Loading classification").
A simple fix for this might be adding touch: true
on the Workflow belongs_to :project
.