do not set a default alias

This commit is contained in:
Niels Lyngsø
2023-06-07 16:45:07 +02:00
parent 8c94cdf74a
commit 146d130900

View File

@@ -55,7 +55,7 @@ export class UmbDocumentTypeServerDataSource implements UmbDataSource<CreateDocu
id: UmbId.new(),
//parentId: parentId,
name: '',
alias: 'new-document-type',
alias: '',
description: '',
icon: 'umb:document',
allowedAsRoot: false,
@@ -97,6 +97,14 @@ export class UmbDocumentTypeServerDataSource implements UmbDataSource<CreateDocu
(documentType as any).$type = undefined;
(documentType as any).id = undefined;
// TODO: Investigate if this matters (should go away anyway when we have the end-point accepts us defining the ids.)
documentType.properties = documentType.properties?.map((prop) => {
return {
...prop,
id: undefined,
}
});
return tryExecuteAndNotify(
this.#host,
DocumentTypeResource.postDocumentType({