2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 21:57:09 +00:00

bugfix and making more robust

This commit is contained in:
2023-11-05 15:20:45 +02:00
parent d524f94c47
commit 2c67351424
3 changed files with 50 additions and 56 deletions

View File

@@ -208,7 +208,9 @@ class EntranceLetterForm(ModelForm):
Nb. The relationship between caves and entrances has historically been a many to many relationship.
With entrances gaining new caves and letters when caves are joined.
"""
entranceletter = forms.CharField(required=False, widget=forms.TextInput(attrs={"size": "2"}))
# This only needs to be required=True for the second and subsequent entrances, not the first. Tricky.
entranceletter = forms.CharField(required=True, widget=forms.TextInput(attrs={"size": "2"}))
class Meta:
model = CaveAndEntrance