diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-11-08 02:12:37 +0200 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-11-08 02:12:37 +0200 |
commit | 2215464cfa0ce1fd3f530a43eb3ef30cd7393d29 (patch) | |
tree | b33249e1a0da6dc0c485bae600b0280b80aea308 /core/models/caves.py | |
parent | b5cc66a5765a627bc4033dfb658cfca211b2b71e (diff) | |
download | troggle-2215464cfa0ce1fd3f530a43eb3ef30cd7393d29.tar.gz troggle-2215464cfa0ce1fd3f530a43eb3ef30cd7393d29.tar.bz2 troggle-2215464cfa0ce1fd3f530a43eb3ef30cd7393d29.zip |
fix error on first creating new ent
Diffstat (limited to 'core/models/caves.py')
-rw-r--r-- | core/models/caves.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/models/caves.py b/core/models/caves.py index 1c9eaf7..fe22ea8 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -237,14 +237,14 @@ class Entrance(TroggleModel): entrance_description = models.TextField(blank=True, null=True) explorers = models.TextField(blank=True, null=True) filename = models.CharField(max_length=200) - findability = models.CharField(max_length=1, choices=FINDABLE_CHOICES, blank=True, null=True) + findability = models.CharField(max_length=1, choices=FINDABLE_CHOICES, blank=True, null=True, default="?") findability_description = models.TextField(blank=True, null=True) lastvisit = models.TextField(blank=True, null=True) lat_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated location_description = models.TextField(blank=True, null=True) long_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated map_description = models.TextField(blank=True, null=True) - marking = models.CharField(max_length=2, choices=MARKING_CHOICES) + marking = models.CharField(max_length=2, choices=MARKING_CHOICES, default="?") marking_comment = models.TextField(blank=True, null=True) name = models.CharField(max_length=100, blank=True, null=True) other_description = models.TextField(blank=True, null=True) @@ -386,7 +386,7 @@ class Entrance(TroggleModel): if not self.filename: self.filename = self.slug + ".html" self.save() - filepath = Path(os.path.join(settings.ENTRANCEDESCRIPTIONS, self.filename)) + filepath = self.get_file_path() t = loader.get_template("dataformat/entrance.xml") now = datetime.now(timezone.utc) |