api: export/import, add uuid for role in dependencies view (#82764)
gitea/chrono/pipeline/head This commit looks good
Details
gitea/chrono/pipeline/head This commit looks good
Details
This commit is contained in:
parent
9defbefe1e
commit
a940ee3961
|
@ -108,6 +108,9 @@ class AgendaDependencies(GenericAPIView):
|
|||
'text': element.name,
|
||||
'type': 'roles',
|
||||
'urls': {},
|
||||
# include uuid in object reference, this is not used for applification API but is useful
|
||||
# for authentic creating its role summary page.
|
||||
'uuid': element.role.uuid if hasattr(element, 'role') else None,
|
||||
}
|
||||
elif isinstance(element, Agenda):
|
||||
return get_agenda_bundle_entry(request, element, 0)
|
||||
|
|
|
@ -82,8 +82,8 @@ def test_agenda_dependencies_groups(app, user):
|
|||
# not group id
|
||||
assert resp.json == {
|
||||
'data': [
|
||||
{'id': group2.id, 'text': group2.name, 'type': 'roles', 'urls': {}},
|
||||
{'id': group1.id, 'text': group1.name, 'type': 'roles', 'urls': {}},
|
||||
{'id': group2.id, 'text': group2.name, 'type': 'roles', 'urls': {}, 'uuid': None},
|
||||
{'id': group1.id, 'text': group1.name, 'type': 'roles', 'urls': {}, 'uuid': None},
|
||||
],
|
||||
'err': 0,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue