diff options
-rw-r--r-- | parsers/survex.py | 11 | ||||
-rw-r--r-- | templates/cavewallets.html | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/parsers/survex.py b/parsers/survex.py index a88b5f3..1214e0c 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -1207,7 +1207,7 @@ class LoadingSurvex: kataster fixedpts/gps and everything at top level, directly in caves-1623/ not in a subdir - NOTE self.cavelist is a superset of GCaveLookup, which already contians both uppercase and lowercase aliases + NOTE self.cavelist is a superset of GCaveLookup, which already contains both uppercase and lowercase aliases why is this called with cavepath="caves-1623/2023-kt-02" when this is a cave where the files are in "caves-1623/2023-kt-02/" cavepath = 'surface/1623' when svxis is 'surface/1623/2004-18to298.svx' @@ -1255,19 +1255,18 @@ class LoadingSurvex: cave = create_new_cave(cavepath, svxid, f"Cave mentioned only in a survex file {svxid=}") # uses the pending code self.caveslist[cavepath.lower()] = cave return cave - else: + else: path_match = rx_svxcollection.search(svxid) if path_match: # message = f" ! Recognised survex file in area {path_match.group(1)} which is not a cave at {svxid=}" # stash_data_issue(parser="survex", message=message, url=None, sb=(svxid)) # print(message, file=sys.stderr) return False - else: - message = f" ! ERROR: no cave at '{svxid}.svx' {cavepath=} " + else: # probably a top level file immediately in the loser directory. No worries. + message = f" ! Warning: no cave identifiable for '{svxid}.svx' {cavepath=} " print("\n" + message) - print("\n" + message, file=sys.stderr) stash_data_issue(parser="survex", message=message, url="{svxid}.svx", sb=(svxid)) - return None + return False def LoadSurvexFile(self, svxid): """Creates SurvexFile in the database, and SurvexDirectory if needed diff --git a/templates/cavewallets.html b/templates/cavewallets.html index 2e67be7..9ad907f 100644 --- a/templates/cavewallets.html +++ b/templates/cavewallets.html @@ -42,6 +42,7 @@ traced to produce Tunnel or Therion drawings and eventually the final complete c <a href="/person/{{p.slug}}">{{p.fullname}}</a>{%if not forloop.last %}, {% endif %} {% endfor %} </td> +<td align="center" style="padding:2px"><a href="{{wallet.get_absolute_url}}">{{wallet.singlescan_set.all|length}}</a></td> <td style="padding:2px"> {% for survexblock in wallet.survexblock_set.all %} <a href="{% url "svx" survexblock.survexfile.path %}">{{survexblock}}</a> |