code: def _update_failure_type(self):
          
          # update the job classification
          note = JobNote.objects.filter(job=self.job).order_by('-created').first()
          if note:
              self.job.failure_classification_id = note.failure_classification.id
          else:
              self.job.failure_classification_id = FailureClassification.objects.get(name='not classified').id
          self.job.save()
docs: Updates the failure type of this Note's Job.
  
          Set the linked Job's failure type to that of the most recent JobNote or
          set to Not Classified if there are no JobNotes.
  
          This is called when JobNotes are created (via .save()) and deleted (via
          .delete()) and is used to resolved the FailureClassification which has
          been denormalised onto Job.