Skip to content

Commit eac5cc4

Browse files
authored
Merge pull request #498 from Winter-Seminar-Series/close-in-person
close in person (hardcode)
2 parents 296a278 + a99b745 commit eac5cc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: backend/payment/serializers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def validate_plans(attrs, is_price=True):
3939
if plans is None:
4040
raise serializers.ValidationError('Invalid plans')
4141
# TODO: add closing date to plan
42-
# for plan in plans:
43-
# if plan.kind == 'M':
44-
# raise serializers.ValidationError('This mode of attendance is not available right now')
42+
for plan in plans:
43+
if plan.kind == 'M' and plan.mode_of_attendance.name.startswith('In Person'):
44+
raise serializers.ValidationError('This mode of attendance is not available right now')
4545
events = set([plan.event for plan in plans])
4646
if len(events) == 1:
4747
event = list(events)[0]

0 commit comments

Comments
 (0)