diff --git a/core/models/survex.py b/core/models/survex.py index 05588f9..de65611 100644 --- a/core/models/survex.py +++ b/core/models/survex.py @@ -178,6 +178,15 @@ class Wallet(models.Model): def get_json(self): jsonfile = Path(self.fpath, 'contents.json') + + # Get from git repo instead + # :drawings: walletjson/2022/2022#01/contents.json + # fpath = /mnt/d/EXPO/expofiles/surveyscans/1999/1999#02 + fp = Path(self.fpath) + wname = fp.name + wyear = fp.parent.name + + jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json" if not Path(jsonfile).is_file(): #print(f'{jsonfile} is not a file') return None