diff --git a/core/models/caves.py b/core/models/caves.py index cac62a8..9d3472f 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -156,8 +156,14 @@ class Cave(TroggleModel): def no_location(self): no_data = True for e in CaveAndEntrance.objects.filter(cave=self): - if e.entrance.best_station: - no_data = False + if e.entrance.best_station() and e.entrance.best_station() != "": + #print(self, e, e.entrance.best_station()) + if e.entrance.best_station_object().x: + no_data = False + # if no_data: + # print(self, "location", no_data) + # else: + # print(self, "NO LOCATION", no_data) return no_data def singleentrance(self): diff --git a/parsers/locations.py b/parsers/locations.py index bde4671..8a5da4f 100644 --- a/parsers/locations.py +++ b/parsers/locations.py @@ -29,7 +29,10 @@ todo = """ class MapLocations(object): """Class used only for identifying the entrance locations - Formerly used to put locations on a prospecting map""" + Formerly used to put locations on a prospecting map + + We don't need these map locations any more ?! + They would only be used in addition to entrances going onto a map display""" p = [ ("laser.0_7", "BNase", "Reference", "Bräuning Nase laser point"), @@ -108,7 +111,11 @@ def validate_entrance_stations(ent=None): if so.count() != 0: message =f"{so.count()} found for Entrance {ent} '{ent_type}' station '{st}' {so}" else: - message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'." + message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'" + if st == ent.best_station(): + message = message + " - AND THIS IS THE 'BEST' ONE" + else: + message = message + " - not the 'best'" stash_data_issue(parser="positions", message=message, url=url) print(message) bads +=1 diff --git a/templates/caveindex.html b/templates/caveindex.html index e863f3d..4c2fb52 100644 --- a/templates/caveindex.html +++ b/templates/caveindex.html @@ -26,7 +26,7 @@ Red star * against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere)
Blue triangle against a name indicates that the cave is 'pending' creation properly.
Orange triangle against a name indicates that the cave has no Entrance (and is not 'pending').
- +Black triangle against a name indicates that the cave has an Entrance, but no entrances have located survey stations.

1623

@@ -42,7 +42,10 @@ Orange triangle against a name indic {{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} {% if cave.filename %} - {% if cave.entrances %}{% else %}{% endif %} + {% if cave.entrances %} + {% if cave.no_location %}{% endif %} + {% else %} + {% endif %} {% else %} {% endif %} {% if cave.survex_file %}{% else %}*{% endif %} @@ -63,7 +66,10 @@ Orange triangle against a name indic {% for cave in caves1626 %} {% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} {% if cave.filename %} - {% if cave.entrances %}{% else %}{% endif %} + {% if cave.entrances %} + {% if cave.no_location %}{% endif %} + {% else %} + {% endif %} {% else %} {% endif %} {% if cave.survex_file %}{% else %}*{% endif %} @@ -84,9 +90,12 @@ Orange triangle against a name indic {% for cave in caves1627 %} {% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}} {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}} {% endif %} {% if cave.filename %} - {% if cave.entrances %}{% else %}{% endif %} - {% else %} + {% if cave.no_location %}{% endif %} + {% if cave.entrances %} + {% else %} {% endif %} + {% else %} + {% endif %} {% if cave.survex_file %}{% else %}*{% endif %}