summaryrefslogtreecommitdiffstats
path: root/core/models/caves.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models/caves.py')
-rw-r--r--core/models/caves.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index b3b3a59..259854d 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -432,6 +432,10 @@ class LogbookEntry(TroggleModel):
# #return super(LogbookEntry, self).__init__(*args, **kwargs) # works in py3.5
# #return TroggleModel.__init__(*args, **kwargs) # fails in py3.5, runtime fail in 3.8
+ def cave(self): # Why didn't he just make this a foreign key to Cave ? Replaces __egtattrribute__ sillyness.
+ c = CaveSlug.objects.get(slug=self.cave_slug, primary=True).cave
+ return c
+
def isLogbookEntry(self): # Function used in templates
return True