mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 07:47:13 +00:00
more dead chicken waving
This commit is contained in:
@@ -44,7 +44,7 @@ class Area(TroggleModel):
|
||||
short_name = models.CharField(max_length=100)
|
||||
name = models.CharField(max_length=200, blank=True, null=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
parent = models.ForeignKey('Area', blank=True, null=True, on_delete=models.SET_NULL)
|
||||
super = models.ForeignKey('Area', blank=True, null=True, on_delete=models.SET_NULL)
|
||||
|
||||
def __str__(self):
|
||||
if self.parent:
|
||||
@@ -231,9 +231,9 @@ class Cave(TroggleModel):
|
||||
areas = self.area.all()
|
||||
lowestareas = list(areas)
|
||||
for area in areas:
|
||||
if area.parent in areas:
|
||||
if area.super in areas:
|
||||
try:
|
||||
lowestareas.remove(area.parent)
|
||||
lowestareas.remove(area.super)
|
||||
except:
|
||||
pass
|
||||
return lowestareas[0]
|
||||
|
||||
Reference in New Issue
Block a user