Commit b03a1a86 by Awais Jibran

addressing comments

parent b99d4b5c
......@@ -464,10 +464,11 @@ class SeatForm(BaseForm):
if not course_run:
return
all_course_run_seats = course_run.seats.all()
seats_data_is_bogus = all_course_run_seats.count() > 2
all_course_run_seats_count = all_course_run_seats.count()
seats_data_is_bogus = all_course_run_seats_count > 2
if seats_data_is_bogus:
logger.info('Removing bogus course run [%d] seats [%d]', course_run.id, all_course_run_seats.count())
all_course_run_seats.delete()
logger.info('Removed bogus course run [%d] seats [%d]', course_run.id, all_course_run_seats_count)
class CourseEntitlementForm(BaseForm):
......
......@@ -3117,7 +3117,6 @@ class CourseRunEditViewTests(SiteMixin, TestCase):
self.assertContains(response, 'CERTIFICATE TYPE AND PRICE', status_code=200)
def login_with_course_user_role(self, course_run, role=PublisherUserRole.CourseTeam):
self.client.logout()
user = course_run.course.course_user_roles.get(role=role).user
self.client.login(username=user.username, password=USER_PASSWORD)
return user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment