Revision 67ef560b snf-astakos-app/astakos/api/tokens.py
b/snf-astakos-app/astakos/api/tokens.py | ||
---|---|---|
102 | 102 |
|
103 | 103 |
d["access"]["serviceCatalog"] = [] |
104 | 104 |
append = d["access"]["serviceCatalog"].append |
105 |
for s in Service.objects.all().order_by("id"): |
|
105 |
for s in Service.objects.all().order_by("id").\ |
|
106 |
prefetch_related('endpoints__data').select_related('component'): |
|
106 | 107 |
endpoints = [] |
107 |
for l in [e.data.values('key', 'value') for e in s.endpoints.all()]:
|
|
108 |
endpoint = dict((d['key'], d['value']) for d in l)
|
|
108 |
for e in s.endpoints.all():
|
|
109 |
endpoint = dict((ed.key, ed.value) for ed in e.data.all())
|
|
109 | 110 |
endpoint["SNF:uiURL"] = s.component.url |
110 | 111 |
endpoint["region"] = "default" |
111 | 112 |
if s.name == 'astakos_weblogin': |
Also available in: Unified diff