Skip to content

Commit

Permalink
Merge pull request #283 from ucsd-ets/hamza/fix_pep8_violations
Browse files Browse the repository at this point in the history
Fixing pep8 violations
  • Loading branch information
HamzaIbnFarooq authored Jan 29, 2020
2 parents 502473a + 817de13 commit 3261c8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions common/djangoapps/student/views/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def student_dashboard(request):
valid_verification_statuses = ['approved', 'must_reverify', 'pending', 'expired']
display_sidebar_on_dashboard = (len(order_history_list) or
(verification_status['status'] in valid_verification_statuses and
verification_status['should_display']))
verification_status['should_display']))

# Filter out any course enrollment course cards that are associated with fulfilled entitlements
for entitlement in [e for e in course_entitlements if e.enrollment_course_run is not None]:
Expand Down Expand Up @@ -871,14 +871,13 @@ def student_dashboard(request):
# course_id for which AuthorizeNet transaction has been perfromed but notification is yet to be received.
transaction_hash = request.COOKIES.get(ECOMMERCE_TRANSACTION_COOKIE_NAME)
if transaction_hash:
decoded_course_id = base64.b64decode(transaction_hash)
decoded_course_id = base64.b64decode(transaction_hash)
transaction_course_id = CourseKey.from_string(decoded_course_id)
pending_transaction_course_name = CourseOverview.get_from_id(transaction_course_id).display_name
context.update({
'pending_upgrade_course_name': pending_transaction_course_name,
})


if ecommerce_service.is_enabled(request.user):
context.update({
'use_ecommerce_payment_flow': True,
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/user_api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ class LocalizedJSONEncoder(DjangoJSONEncoder):
JSON handler that evaluates ugettext_lazy promises.
"""
# pylint: disable=method-hidden

def default(self, obj):
"""
Forces evaluation of ugettext_lazy promises.
Expand Down Expand Up @@ -516,7 +517,6 @@ def _inner(request): # pylint: disable=missing-docstring
else:
response.content = msg


# Return the response, preserving the original headers.
# This is really important, since the student views set cookies
# that are used elsewhere in the system (such as the marketing site).
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/zendesk_proxy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

log = logging.getLogger(__name__)


def create_zendesk_ticket(requester_name, requester_email, subject, body, custom_fields=None, uploads=None, tags=None):
"""
Create a Zendesk ticket via API or send an email to support team.
Expand Down

0 comments on commit 3261c8e

Please sign in to comment.