Skip to content

Follow-up from "Resolve "pipeline_schedules pages throwing error 500""

The following discussion from !11706 (merged) should be addressed:

  • @dosuken123 started a discussion: (+4 comments)

    @godfat I'd like to ask about this edge case.

    Here, we want to check if the pipeline_schedule.ref is either nil or empty because project_ref_path can not take an invalid ref. However, I just realized this is not appropriate "guard" code, because if pipeline_schedule.ref is empty (e.g. ""), then it passes through.

    What kind of "guard" coding is appropriate here? unless pipeline_schedule.ref.blank??

    Also do you think if it's good idea to check the existance of the ref strictly? like, if ref_exist?(project, pipeline_schedule.ref).