summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/models/logbooks.py2
-rw-r--r--core/models/survex.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/models/logbooks.py b/core/models/logbooks.py
index a5239f7..1c7c9f7 100644
--- a/core/models/logbooks.py
+++ b/core/models/logbooks.py
@@ -175,7 +175,7 @@ class PersonLogEntry(TroggleModel):
personexpedition = models.ForeignKey("PersonExpedition", null=True, on_delete=models.CASCADE)
time_underground = models.FloatField(help_text="In decimal hours")
- logbook_entry = models.ForeignKey(LogbookEntry, on_delete=models.CASCADE)
+ logbook_entry = models.ForeignKey(LogbookEntry, on_delete=models.CASCADE, db_index=True)
is_logbook_entry_author = models.BooleanField(default=False)
nickname_used = models.CharField(max_length=100,default="") # e.g. "Animal" or "Zonker", as it appears in the original logbook
diff --git a/core/models/survex.py b/core/models/survex.py
index 6b9a818..fabc381 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -205,7 +205,7 @@ class SurvexBlock(models.Model):
expedition = models.ForeignKey("Expedition", blank=True, null=True, on_delete=models.SET_NULL)
# if the survexfile object is deleted, then all the survex-blocks in it should be too,
# though a block can span more than one file...
- survexfile = models.ForeignKey("SurvexFile", blank=True, null=True, on_delete=models.CASCADE)
+ survexfile = models.ForeignKey("SurvexFile", blank=True, null=True, on_delete=models.CASCADE, db_index=True)
# survexpath = models.CharField(max_length=200, blank=True, null=True) No need for this anymore
scanswallet = models.ForeignKey(