Handle the indexerror exception on create_order
LMS-2646
Merge pull request #3880 from mlkwaqas/waqas/lms2646-create-order-list-index-error

Handle the indexerror exception on create_order