Commit 8951cc0e authored by Fabrice PEIX's avatar Fabrice PEIX
Browse files

Bug fix in dbird creation after adding site

parent 083d54e7
......@@ -31,21 +31,23 @@ station:
% endif
owner: "{{station.observatory().description()}}"
site:
name: "{{station.site().name()}}"
% if station.site().administrative_code() is not none
description: "{{station.site().administrative_code()}}"
% set site = (station.station_site()|list)[0]
% set address = site.address()
name: "{{site.name()}}"
% if address.administrative_code() is not none
description: "{{address.administrative_code()}}"
% endif
% if station.site().town() is not none
town: "{{station.site().town()}}"
% if address.town() is not none
town: "{{address.town()}}"
% endif
% if station.site().county() is not none
county: "{{station.site().county()}}"
% if address.county() is not none
county: "{{address.county()}}"
% endif
% if station.site().region() is not none
region: "{{station.site().region()}}"
% if address.region() is not none
region: "{{address.region()}}"
% endif
% if station.site().country() is not none
country: "{{station.site().country()}}"
% if address.country() is not none
country: "{{address.country()}}"
% endif
% if station.observatory().url() is not none
owner_website: "{{station.observatory().url()}}"
......
......@@ -528,7 +528,7 @@ def main():
current.author().contact().load("contact_email")
current.author().contact().load("contact_phone")
# Preload site for this station
current.load("site")
current_station.load("station_site")
generator_dict['stations'] = [current_station]
generator_dict['networks'] = networks
......@@ -554,14 +554,14 @@ def main():
update_author_network(current_net, author_set)
for current_station in station_list:
update_author_station(current_station, author_set)
# Preload site for this station
current_station.load("station_site")
# Preload email and phone number
for current in author_set:
current.author().contact().load("contact_email")
current.author().contact().load("contact_phone")
# Preload site for this station
current.load("site")
generator_dict['stations'] = station_list
generator_dict['networks'] = networks
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment