summaryrefslogtreecommitdiff
path: root/kpov_judge/add_task.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-02-20 19:38:07 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-02-20 19:38:07 +0100
commit09b1da8784e452a177fe560c44f93fb7a7c89ba9 (patch)
tree273f21f09e6593f4d3661a983c4e3b4af9533f58 /kpov_judge/add_task.py
parent1f37f60acf8cceb7877fcd19abb9777a838514e1 (diff)
add_task: fix loading networks from task.py
Diffstat (limited to 'kpov_judge/add_task.py')
-rwxr-xr-xkpov_judge/add_task.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py
index 5b77668..7bb2f3e 100755
--- a/kpov_judge/add_task.py
+++ b/kpov_judge/add_task.py
@@ -73,7 +73,7 @@ if __name__ == '__main__':
db.computers_meta.remove({'task_id': task_id, 'class_id': class_id})
auto_networks = set([None])
for k, v in d['computers'].items():
- for n in v.get('networks_interfaces', []):
+ for n in v.get('network_interfaces', []):
auto_networks.add(n.get('network', None))
db.computers_meta.update({
'task_id': task_id,
@@ -83,7 +83,7 @@ if __name__ == '__main__':
auto_networks.remove(None)
db.networks.remove({'task_id': task_id, 'class_id': class_id})
try:
- net_list = iter(networks.items())
+ net_list = d['networks'].items()
except:
net_list = [(k, {'public': False}) for k in auto_networks]
for k, v in net_list: