We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 296a278 + a99b745 commit eac5cc4Copy full SHA for eac5cc4
backend/payment/serializers.py
@@ -39,9 +39,9 @@ def validate_plans(attrs, is_price=True):
39
if plans is None:
40
raise serializers.ValidationError('Invalid plans')
41
# 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')
+ for plan in plans:
+ if plan.kind == 'M' and plan.mode_of_attendance.name.startswith('In Person'):
+ raise serializers.ValidationError('This mode of attendance is not available right now')
45
events = set([plan.event for plan in plans])
46
if len(events) == 1:
47
event = list(events)[0]
0 commit comments