Browse Source

Fixed vault item id not being added to view model.

tags/2.0.6
Teknikode 3 years ago
parent
commit
123029efd6
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      Teknik/Areas/Vault/Controllers/VaultController.cs

+ 2
- 6
Teknik/Areas/Vault/Controllers/VaultController.cs View File

@@ -49,12 +49,6 @@ namespace Teknik.Areas.Vault.Controllers
{
foreach (VaultItem item in foundVault.VaultItems)
{
VaultItemViewModel itemModel = new VaultItemViewModel();
itemModel.VaultItemId = item.VaultItemId;
itemModel.Title = item.Title;
itemModel.Description = item.Description;
itemModel.DateAdded = item.DateAdded;

if (item.GetType().BaseType == typeof(UploadVaultItem))
{
UploadVaultItem upload = (UploadVaultItem)item;
@@ -64,6 +58,7 @@ namespace Teknik.Areas.Vault.Controllers
db.SaveChanges();

UploadItemViewModel uploadModel = new UploadItemViewModel();
upload.VaultItemId = item.VaultItemId;
uploadModel.Title = item.Title;
uploadModel.Description = item.Description;
uploadModel.DateAdded = item.DateAdded;
@@ -87,6 +82,7 @@ namespace Teknik.Areas.Vault.Controllers
}

PasteItemViewModel pasteModel = new PasteItemViewModel();
pasteModel.VaultItemId = item.VaultItemId;
pasteModel.Title = item.Title;
pasteModel.Description = item.Description;
pasteModel.DateAdded = item.DateAdded;

Loading…
Cancel
Save