Troubleshoot Ecommerce
2. UserProfile Error
Screenshot for reference:
If you check LMS logs and get the following error:
DoesNotExist: UserProfile matching query does not exist.
Reason When ecommerce service publishes course data to LMS, it uses the ecommerce_worker user to perform operations, instead of your current user logged-in to ecommerce. As the error above dictates, the user ecommerce_worker has no defined UserProfile object. This error occurs only in production, while in devstack the existence of a User Profile is not required.
Solution (works only in production): Go to LMS Django Admin > Authentication > Users
Home › Authentication and Authorization › Users
Select ecommerce_worker to edit Scroll down to User Profile (inline field) and add some info (at least a name like ‘E-commerce Worker’. Save your edits.
Screenshot for reference: