panoptes icon indicating copy to clipboard operation
panoptes copied to clipboard

Project cache doesn't invalidate when creating a workflow

Open marten opened this issue 7 years ago • 1 comments

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.

marten avatar Jul 10 '17 15:07 marten