From b4ba3c40ebf26cae49e93f2aa6c2f1b6e8bc556e Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 20 Apr 2021 22:58:41 +0100 Subject: catch unknown scotsman error --- core/models/caves.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/models/caves.py') diff --git a/core/models/caves.py b/core/models/caves.py index 536ace8..c76b8b5 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -373,7 +373,6 @@ class LogbookEntry(TroggleModel): place = models.CharField(max_length=100,blank=True, null=True,help_text="Only use this if you haven't chosen a cave") text = models.TextField() slug = models.SlugField(max_length=50) - filename = models.CharField(max_length=200,null=True) entry_type = models.CharField(default="wiki",null=True,choices=LOGBOOK_ENTRY_TYPES,max_length=50) class Meta: @@ -412,7 +411,7 @@ class LogbookEntry(TroggleModel): return urljoin(settings.URL_ROOT, reverse('logbookentry',kwargs={'date':self.date,'slug':self.slug})) def __str__(self): - return "%s: (%s)" % (self.date, self.title) + return f'{self.date}: {self.title}' def get_next_by_id(self): LogbookEntry.objects.get(id=self.id+1) @@ -507,7 +506,7 @@ class PersonTrip(TroggleModel): return self.logbook_entry.cave and self.logbook_entry.cave or self.logbook_entry.place def __str__(self): - return "%s (%s)" % (self.personexpedition, self.logbook_entry.date) + return f'{self.personexpedition} ({self.logbook_entry.date})' scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL) def get_scan_path(instance, filename): -- cgit v1.2.3