diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-07-19 20:00:35 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-07-19 20:00:35 +0300 |
commit | d9d75b3aee5bcbeb2f0f238dd239676404f79eab (patch) | |
tree | 64a328b8443127671406a50d403e9a675f99fa8a | |
parent | 1395ac76e97cf21a2e6c361a0095b9505237a98a (diff) | |
download | troggle-d9d75b3aee5bcbeb2f0f238dd239676404f79eab.tar.gz troggle-d9d75b3aee5bcbeb2f0f238dd239676404f79eab.tar.bz2 troggle-d9d75b3aee5bcbeb2f0f238dd239676404f79eab.zip |
another attempt to avoid non-null parent pseudo error
-rw-r--r-- | parsers/caves.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/parsers/caves.py b/parsers/caves.py index 4290efc..638adcc 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -170,10 +170,11 @@ def readcaves(): DataIssue.objects.filter(parser='caves ok').delete() DataIssue.objects.filter(parser='entrances').delete() - area_1623, state = Area.objects.update_or_create(short_name = "1623", parent = None) - # This seems to return a tuple, not a single object! i.e. (<Area: 1623>, True) + print(" - Creating Areas 1623 and 1626") + # This crashes on the server with MariaDB even though a null parent is explicitly allowed. + area_1623, state = Area.objects.update_or_create(short_name = "1623") #print(f' ! - READ CAVES: {area_1623}') - area_1626, state = Area.objects.update_or_create(short_name = "1626", parent = None) + area_1626, state = Area.objects.update_or_create(short_name = "1626") print (" - Setting pending caves") # Do this first, so that these empty entries are overwritten as they get properly created. |