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.refis either nil or empty becauseproject_ref_pathcan not take an invalid ref. However, I just realized this is not appropriate "guard" code, because ifpipeline_schedule.refis 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).