Skip to content
Open
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions src/Core/Tools/ImportFeatures/ImportCiphersCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
{
cipher.Favorites = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":\"true\"}}";
}

if (cipher.ArchivedDate.HasValue)
{
cipher.Archives = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":\"" +
$"{cipher.ArchivedDate.Value:yyyy-MM-ddTHH:mm:ss.fffffffZ}\"}}";
}
}

var userfoldersIds = (await _folderRepository.GetManyByUserIdAsync(importingUserId)).Select(f => f.Id).ToList();
Expand Down Expand Up @@ -122,7 +128,7 @@
{
var org = collections.Count > 0 ?
await _organizationRepository.GetByIdAsync(collections[0].OrganizationId) :
await _organizationRepository.GetByIdAsync(ciphers.FirstOrDefault(c => c.OrganizationId.HasValue).OrganizationId.Value);

Check warning on line 131 in src/Core/Tools/ImportFeatures/ImportCiphersCommand.cs

View workflow job for this annotation

GitHub Actions / Sonar / Quality scan

'ciphers.FirstOrDefault(c => c.OrganizationId.HasValue)' is null on at least one execution path. (https://rules.sonarsource.com/csharp/RSPEC-2259)
var importingOrgUser = await _organizationUserRepository.GetByOrganizationAsync(org.Id, importingUserId);

if (collections.Count > 0 && org != null && org.MaxCollections.HasValue)
Expand Down
Loading