diff --git a/src/DARE-API/Repositories/DbContexts/DataInitaliser.cs b/src/DARE-API/Repositories/DbContexts/DataInitaliser.cs index 6211cd1e1..eed4427ee 100644 --- a/src/DARE-API/Repositories/DbContexts/DataInitaliser.cs +++ b/src/DARE-API/Repositories/DbContexts/DataInitaliser.cs @@ -214,6 +214,7 @@ private void AddMissingUser(Project project, User user) var submissionUserAttribute = _userService.SetMinioUserAttribute(accessToken, user.Name.ToString(), attributeName, project.SubmissionBucket.ToLower() + "_policy").Result; var outputUserAttribute = _userService.SetMinioUserAttribute(accessToken, user.Name.ToString(), attributeName, project.OutputBucket.ToLower() + "_policy").Result; + project.Users.Add(user); } } diff --git a/src/TRE-API/Services/DareSyncHelper.cs b/src/TRE-API/Services/DareSyncHelper.cs index 7d010036c..e2b93ed64 100644 --- a/src/TRE-API/Services/DareSyncHelper.cs +++ b/src/TRE-API/Services/DareSyncHelper.cs @@ -52,6 +52,7 @@ public async Task SyncSubmissionWithTre() dbprojs.Where(x => x.Archived && subprojs.Any(y => y.Id == x.SubmissionProjectId)); foreach (var project in projectAdds) { + var submission = project.SubmissionBucket.ToLower() + "tre".Replace("_", ""); var output = project.OutputBucket.ToLower() + "tre".Replace("_", ""); var submissionBucket = await _minioTreHelper.CreateBucket(submission);