Reformat code
This commit is contained in:
parent
b4421bc9b2
commit
b19c3bdcde
1 changed files with 2 additions and 4 deletions
|
@ -88,8 +88,7 @@ class Membership(models.Model):
|
||||||
membershiporder__created_at__month=datetime.today().month
|
membershiporder__created_at__month=datetime.today().month
|
||||||
)
|
)
|
||||||
# import pdb;pdb.set_trace()
|
# import pdb;pdb.set_trace()
|
||||||
return cls.objects.\
|
return cls.objects.filter(has_order_current_month).last()
|
||||||
filter(has_order_current_month).last()
|
|
||||||
|
|
||||||
# def get_current_active_membership(cls, user):
|
# def get_current_active_membership(cls, user):
|
||||||
# membership = cls.get_current_membership(user)
|
# membership = cls.get_current_membership(user)
|
||||||
|
@ -97,8 +96,7 @@ class Membership(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_by_user(cls, user):
|
def get_by_user(cls, user):
|
||||||
return cls.objects.\
|
return cls.objects.filter(membershiporder__customer__user=user).last()
|
||||||
filter(membershiporder__customer__user=user).last()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, data):
|
def create(cls, data):
|
||||||
|
|
Loading…
Reference in a new issue