summaryrefslogtreecommitdiffstats
path: root/core/forms.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-11-05 15:20:45 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2023-11-05 15:20:45 +0200
commit2c673514240d93c5a4431c98f87aafecb94bc081 (patch)
tree81052fc5b936ffee9061bdf8278b3a30070848b3 /core/forms.py
parentd524f94c478612da93fa6b66cd65e4cb3a26ec0b (diff)
downloadtroggle-2c673514240d93c5a4431c98f87aafecb94bc081.tar.gz
troggle-2c673514240d93c5a4431c98f87aafecb94bc081.tar.bz2
troggle-2c673514240d93c5a4431c98f87aafecb94bc081.zip
bugfix and making more robust
Diffstat (limited to 'core/forms.py')
-rw-r--r--core/forms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/forms.py b/core/forms.py
index 24beee4..5cbbe95 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -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