[FIX] Student membership creation (PR #2144)

Related issues

Proposed changes

Fix error when creating memberships from other methods than stripe

How to reproduce

  1. Open shell
  2. Select an user
  3. Run ankihub/memberships/services.py::MembershipHandler.create_membership(user, customer=None)
  4. The membership should be created

GitHub

:mag: Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

:page_facing_up: File: ankihub/memberships/services.py

Function Unhandled Issue
create_membership AttributeError: ‘NoneType’ object has no attribute ‘get’ /scholarship-requ…
Event Count: 2

Did you find this useful? React with a :+1: or :-1:

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.82%. Comparing base (c849b26) to head (2871bce).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2144   +/-   ##
=======================================
  Coverage   97.81%   97.82%           
=======================================
  Files         156      156           
  Lines       21832    21841    +9     
=======================================
+ Hits        21356    21365    +9     
  Misses        476      476           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

LGTM