forked from expo/troggle
Make drawings repo the MASTER for contents.json
This commit is contained in:
parent
ac22a984ee
commit
186eb20fb3
@ -178,6 +178,15 @@ class Wallet(models.Model):
|
|||||||
|
|
||||||
def get_json(self):
|
def get_json(self):
|
||||||
jsonfile = Path(self.fpath, 'contents.json')
|
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():
|
if not Path(jsonfile).is_file():
|
||||||
#print(f'{jsonfile} is not a file')
|
#print(f'{jsonfile} is not a file')
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user