mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 16:17:12 +00:00
SurvexDirectory removed from active code
This commit is contained in:
@@ -18,7 +18,7 @@ from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
import troggle.settings as settings
|
||||
from troggle.core.models.logbooks import LogbookEntry
|
||||
from troggle.core.models.caves import Cave, GetCaveLookup
|
||||
from troggle.core.models.survex import SurvexFile, SurvexBlock, SurvexDirectory
|
||||
from troggle.core.models.survex import SurvexFile, SurvexBlock #, SurvexDirectory
|
||||
from troggle.core.models.wallets import Wallet
|
||||
from troggle.core.utils import only_commit
|
||||
from troggle.parsers.survex import parse_one_file
|
||||
@@ -654,27 +654,19 @@ def survexdir(request):
|
||||
as the info it holds is always embedded in the survexFile path directories
|
||||
"""
|
||||
|
||||
sds = SurvexDirectory.objects.all() #.order_by("cave")
|
||||
for sd in sds:
|
||||
sd.matchbad = True
|
||||
if f"{sd.primarysurvexfile}".startswith(str(sd.path)):
|
||||
sd.matchbad = False
|
||||
# sds = SurvexDirectory.objects.all() #.order_by("cave")
|
||||
sds ={}
|
||||
# for sd in sds:
|
||||
# sd.matchbad = True
|
||||
# if f"{sd.primarysurvexfile}".startswith(str(sd.path)):
|
||||
# sd.matchbad = False
|
||||
|
||||
sd.pathbad = True
|
||||
if Path(settings.SURVEX_DATA, f"{sd.primarysurvexfile}.svx").is_file():
|
||||
sd.pathbad = False
|
||||
# sd.pathbad = True
|
||||
# if Path(settings.SURVEX_DATA, f"{sd.primarysurvexfile}.svx").is_file():
|
||||
# sd.pathbad = False
|
||||
|
||||
survexfiles = SurvexFile.objects.all().order_by("cave")
|
||||
for f in survexfiles:
|
||||
if f.survexdirectory:
|
||||
f.matchbad = True
|
||||
if f"{f.path}".startswith(str(f.survexdirectory.path)):
|
||||
f.matchbad = False
|
||||
f.primarybad = True
|
||||
if f.primary:
|
||||
f.pathparent = Path(f.primary.path).parent
|
||||
if str(f.survexdirectory.path) == str(f.pathparent):
|
||||
f.primarybad = False
|
||||
f.pathbad = True
|
||||
if Path(settings.SURVEX_DATA, f"{f.path}.svx").is_file():
|
||||
f.pathbad = False
|
||||
|
||||
Reference in New Issue
Block a user