03-06-2017 01:59 PM
Hello folks,
I'm using the python nuxeo client library to create a workspace as follows:
adminClient = nuxeo.Nuxeo(
base_url=URL,
auth={
'username': 'Administrator',
'password': 'Administrator'
})
repository = adminClient.repository()
wsRoot = '/default-domain/workspaces'
ws = {
'name': "china",
'type': 'Workspace',
'properties': {'dc:title': "China"}
}
res = repository.create(wsRoot, ws)
The call succeeds.. however, I don't see the change reflected in the Admin UI (with a simple refresh to list the workspaces). But if I create another workspace via the UI, the "china" workspace then appears. So it looks like I'm missing a 'flush' call to make the UI sync w/the data. Can someone help?
thanks
03-06-2017 02:18 PM
Quick update:
If I add a doc.save() at the end, it seems to fix the issue. Can someone comment on whether this is really necessary, and the recommended approach?
ws = {
'name': "china",
'type': 'Workspace',
'properties': {'dc:title': "China"}
doc = repository.create(wsRoot, ws)
doc.save()
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.