Skip to content

Commit

Permalink
#462 Don't propose EFS table layer into layer adding options
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSAMPERE committed Jul 11, 2023
1 parent 626289a commit f6e7808
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions modules/results/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def show_results(self, api_results):
if md.type == "vectorDataset" or md.type == "rasterDataset" or md.type == "noGeoDataset":
for layer in md.serviceLayers:
service = layer.get("service")
if service is not None and service.get("format"):
if service is not None and service.get("format") and not (service.get("format") == "efs" and layer.get("type") == "table"):
srv_details = {
"path": service.get("path", "NR"),
"formatVersion": service.get("formatVersion"),
Expand Down Expand Up @@ -491,6 +491,9 @@ def show_results(self, api_results):
)
)
pass
else:
pass

# New association mode. For services metadata sheet, the layers
# are stored in the purposely named include: "layers".
elif md.type == "service":
Expand All @@ -502,17 +505,20 @@ def show_results(self, api_results):
if md.format.lower() in self.service_ico_dict:
service_type = md.format.upper()
for layer in md.layers:
layer_title = geo_srv_mng.build_layer_title(service_type, layer)
btn_label = "{} : {}".format(service_type, layer_title)
params = [service_type, layer, srv_details]
basic_md = [
md.title,
md.abstract,
md.keywords,
portal_md_url,
]
params.append(basic_md)
add_options_dict[btn_label] = params
if md.format.lower() == "efs" and layer.get("type") == "table":
continue
else:
layer_title = geo_srv_mng.build_layer_title(service_type, layer)
btn_label = "{} : {}".format(service_type, layer_title)
params = [service_type, layer, srv_details]
basic_md = [
md.title,
md.abstract,
md.keywords,
portal_md_url,
]
params.append(basic_md)
add_options_dict[btn_label] = params
else:
pass
else:
Expand Down

0 comments on commit f6e7808

Please sign in to comment.