The key factor is whether your flight training unit is recognized as a qualifying post-secondary institution under IRCC rules, not simply how long the training took. If your school was a designated learning institution (DLI) and your program made you eligible for a Post-Graduation Work Permit...