Pause / unpause using alberta timezone date

This commit is contained in:
Tanner Collin 2020-02-26 00:56:46 +00:00
parent 37d0030966
commit d4f5ab03cf

View File

@ -122,7 +122,7 @@ class MemberViewSet(Base, Retrieve, Update):
if not is_admin_director(self.request.user): if not is_admin_director(self.request.user):
raise exceptions.PermissionDenied() raise exceptions.PermissionDenied()
member = self.get_object() member = self.get_object()
member.paused_date = datetime.date.today() member.paused_date = utils.today_alberta_tz()
member.save() member.save()
return Response(200) return Response(200)
@ -131,7 +131,7 @@ class MemberViewSet(Base, Retrieve, Update):
if not is_admin_director(self.request.user): if not is_admin_director(self.request.user):
raise exceptions.PermissionDenied() raise exceptions.PermissionDenied()
member = self.get_object() member = self.get_object()
member.current_start_date = datetime.date.today() member.current_start_date = utils.today_alberta_tz()
member.paused_date = None member.paused_date = None
member.save() member.save()
utils.tally_membership_months(member) utils.tally_membership_months(member)