Add limits to possible monthly_fees

This commit is contained in:
Tanner Collin 2020-11-15 05:33:15 +00:00
parent d56a530312
commit a083a7814f
2 changed files with 3 additions and 0 deletions

View File

@ -187,6 +187,7 @@ class AdminMemberSerializer(MemberSerializer):
street_address = serializers.CharField(required=False) street_address = serializers.CharField(required=False)
city = serializers.CharField(required=False) city = serializers.CharField(required=False)
postal_code = serializers.CharField(required=False) postal_code = serializers.CharField(required=False)
monthly_fees = serializers.ChoiceField([10, 30, 35, 50, 55])
class Meta: class Meta:
model = models.Member model = models.Member

View File

@ -139,6 +139,8 @@ class MemberViewSet(Base, Retrieve, Update):
member = self.get_object() member = self.get_object()
member.current_start_date = utils.today_alberta_tz() member.current_start_date = utils.today_alberta_tz()
member.paused_date = None member.paused_date = None
if not member.monthly_fees:
member.monthly_fees = 55
member.save() member.save()
utils.tally_membership_months(member) utils.tally_membership_months(member)
utils.gen_member_forms(member) utils.gen_member_forms(member)