Skip to content

Commit f4df3ae

Browse files
committed
Fix: add invoice request
1 parent 9f2d88f commit f4df3ae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bases/rsptx/admin_server_api/routers/instructor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
create_course,
2828
create_course_attribute,
2929
create_instructor_course_entry,
30+
create_invoice_request,
3031
create_membership,
3132
create_user_course_entry,
3233
delete_course_completely,
@@ -1223,6 +1224,11 @@ async def post_create_course_page(
12231224
course_validator = CoursesValidator(**course_data)
12241225
new_course = await create_course(course_validator)
12251226

1227+
# if invoice is true then we need to create an invoice for the course
1228+
if invoice == "true":
1229+
res = await create_invoice_request(
1230+
user.username, projectname, 0.0, user.email
1231+
)
12261232
# Copy attributes from base course
12271233
bc = await fetch_course(coursetype)
12281234
attrs = await fetch_all_course_attributes(bc.id)

0 commit comments

Comments
 (0)