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

Handle the indexerror exception on create_order