From 1c2915cd9277f5a92bb7893edda94905ae79840f Mon Sep 17 00:00:00 2001 From: Syed Sajjad Hussain Shah Date: Thu, 28 Nov 2024 16:44:53 +0500 Subject: [PATCH] fix: docs error --- commerce_coordinator/apps/lms/tasks.py | 2 +- docs/conf.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/commerce_coordinator/apps/lms/tasks.py b/commerce_coordinator/apps/lms/tasks.py index 37d81257a..9ef798c71 100644 --- a/commerce_coordinator/apps/lms/tasks.py +++ b/commerce_coordinator/apps/lms/tasks.py @@ -97,7 +97,7 @@ def fulfill_order_placed_send_enroll_in_course_task( f'LMS fulfill_order_placed_send_enroll_in_course_task fired with {locals()},' ) - user = User.objects.get(lms_user_id=1) + user = User.objects.get(lms_user_id=edx_lms_user_id) enrollment_data = { 'user': user.username, diff --git a/docs/conf.py b/docs/conf.py index 9400054a9..ee2d69096 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -75,7 +75,6 @@ def get_version(*file_paths): # A list of warning types to suppress arbitrary warning messages. suppress_warnings = [ 'image.nonlocal_uri', - 'role:setting', ] # Add any paths that contain templates here, relative to this directory. @@ -152,6 +151,7 @@ def get_version(*file_paths): # This file is intended as a guide for developers browsing the source tree, # not to be rendered into the output docs. 'decisions/README.rst', + 'celery', ] # The reST default role (used for this markup: `text`) to use for all @@ -557,3 +557,9 @@ def setup(app): """Sphinx extension: run sphinx-apidoc.""" event = 'builder-inited' app.connect(event, on_init) + app.add_role('setting', setting_role) + +def setting_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + """Custom role for :setting:.""" + # Here, you can decide how the role should be rendered + return text