Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public async Task<ActionResult> SaveResourceDetailAsync([FromBody] ResourceDetai
request.Description = Regex.Replace(request.Description, "<p> ", "<p>");
request.Description = Regex.Replace(request.Description, "<p></p>", string.Empty);
request.Description = Regex.Replace(request.Description, "\\n", string.Empty);

request.PrimaryCatalogueNodeId = (int)request.ResourceCatalogueId;
int resourceVersionId = await this.contributeService.SaveResourceDetailAsync(request);
return this.Ok(resourceVersionId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ BEGIN

SELECT @NodeVersionId = SCOPE_IDENTITY()

UPDATE nv SET PrimaryCatalogueNodeId = CatalogueNodeId from hierarchy.NodePath np
INNER JOIN hierarchy.NodeVersion nv ON nv.NodeId = np.NodeId where nv.Id =@NodeVersionId

UPDATE [hierarchy].[Node]
SET CurrentNodeVersionId = @NodeVersionId
WHERE Id = @NodeId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ public async Task<List<ResourceVersion>> GetResourceVersionsAsync(int resourceId
resourceVersionUpdate.ResourceLicenceId = resourceVersion.ResourceLicenceId == 0 ? null : resourceVersion.ResourceLicenceId;
resourceVersionUpdate.SensitiveContent = resourceVersion.SensitiveContent;
resourceVersionUpdate.CertificateEnabled = resourceVersion.CertificateEnabled;
resourceVersionUpdate.PrimaryCatalogueNodeId = resourceVersion.PrimaryCatalogueNodeId;
this.SetAuditFieldsForUpdate(userId, resourceVersionUpdate);
}

Expand Down