mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 07:40:19 +00:00
primary key now UUID on SurvexBlock
This commit is contained in:
@@ -260,7 +260,15 @@ class QM(TroggleModel):
|
||||
)
|
||||
grade = models.CharField(max_length=1, blank=True, null=True, help_text="A/B/C/D/X")
|
||||
cave = models.ForeignKey("Cave", related_name="QMs", blank=True, null=True, on_delete=models.SET_NULL)
|
||||
block = models.ForeignKey("SurvexBlock", null=True, on_delete=models.SET_NULL) # only for QMs from survex files
|
||||
|
||||
# only for QMs from survex files
|
||||
block = models.ForeignKey(
|
||||
"SurvexBlock",
|
||||
to_field="_blockid", # Explicitly point to the UUID field
|
||||
null=True,
|
||||
on_delete=models.SET_NULL
|
||||
)
|
||||
# block = models.ForeignKey("SurvexBlock", null=True, on_delete=models.SET_NULL)
|
||||
blockname = models.TextField(blank=True, null=True) # NB truncated copy of survexblock name with last char added
|
||||
expoyear = models.CharField(max_length=4, blank=True, null=True)
|
||||
ticked = models.BooleanField(default=False)
|
||||
|
||||
Reference in New Issue
Block a user