Fix class name 9n
This commit is contained in:
@ -402,6 +402,7 @@ class NewCategory(models.Model):
|
|||||||
num_of_member = models.IntegerField(default=1)
|
num_of_member = models.IntegerField(default=1)
|
||||||
family = models.BooleanField(default=False)
|
family = models.BooleanField(default=False)
|
||||||
female = models.BooleanField(default=False)
|
female = models.BooleanField(default=False)
|
||||||
|
trial = models.BooleanField(default=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ('category_name','category_number')
|
unique_together = ('category_name','category_number')
|
||||||
@ -463,8 +464,9 @@ class Entry(models.Model):
|
|||||||
else:
|
else:
|
||||||
if not adults:
|
if not adults:
|
||||||
raise ValidationError("18歳以上のメンバーが1名以上必要です。")
|
raise ValidationError("18歳以上のメンバーが1名以上必要です。")
|
||||||
if children:
|
|
||||||
raise ValidationError("ファミリーカテゴリー以外では、小学生以下のメンバーは参加できません。")
|
if children and not self.category.trial:
|
||||||
|
raise ValidationError("ファミリーカテゴリーまたはお試し以外では、小学生以下のメンバーは参加できません。")
|
||||||
|
|
||||||
if self.category.num_of_member == 1:
|
if self.category.num_of_member == 1:
|
||||||
if len(members) != 1:
|
if len(members) != 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user