mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
Add "links" collection to index resources, again (#1594)
With the introduction of react-query, it looks like the indexResources attribute of the repository initialization extension properties lost its collection links, which was replaces by _links. In this fix we copy this collection, so that the template plugin still can use links. Fixes #1593
This commit is contained in:
@@ -124,10 +124,11 @@ const RepositoryForm: FC<Props> = ({
|
||||
if (isEditMode()) {
|
||||
return null;
|
||||
}
|
||||
const indexResourcesWithLinks = { ...indexResources, links: indexResources?._links };
|
||||
const extensionProps = {
|
||||
repository: repo,
|
||||
setCreationContextEntry: setCreationContextEntry,
|
||||
indexResources
|
||||
indexResources: indexResourcesWithLinks
|
||||
};
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user