From 8898c58f3cec641f3de5c042c4f1b475ee30fbf8 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 14 Dec 2017 16:20:59 -0500 Subject: [PATCH] type row keys should be ints --- src/Core/Models/Data/EventTableEntity.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Core/Models/Data/EventTableEntity.cs b/src/Core/Models/Data/EventTableEntity.cs index bacb036aac..7b9e3a1cfa 100644 --- a/src/Core/Models/Data/EventTableEntity.cs +++ b/src/Core/Models/Data/EventTableEntity.cs @@ -36,13 +36,13 @@ namespace Bit.Core.Models.Data { PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__UserId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), UserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), UserId, (int)Type); } else { PartitionKey = $"UserId={UserId}"; RowKey = string.Format("Date={0}__Type={1}", - CoreHelpers.DateTimeToTableStorageKey(Date), Type); + CoreHelpers.DateTimeToTableStorageKey(Date), (int)Type); } break; case EventType.Cipher_Created: @@ -56,13 +56,13 @@ namespace Bit.Core.Models.Data { PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__CipherId={1}__ActingUserId={2}__Type={3}", - CoreHelpers.DateTimeToTableStorageKey(Date), CipherId, ActingUserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), CipherId, ActingUserId, (int)Type); } else { PartitionKey = $"UserId={UserId}"; RowKey = string.Format("Date={0}__CipherId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), CipherId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), CipherId, (int)Type); } break; case EventType.Collection_Created: @@ -70,14 +70,14 @@ namespace Bit.Core.Models.Data case EventType.Collection_Deleted: PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__ActingUserId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, (int)Type); break; case EventType.Group_Created: case EventType.Group_Updated: case EventType.Group_Deleted: PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__ActingUserId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, (int)Type); break; case EventType.OrganizationUser_Invited: case EventType.OrganizationUser_Confirmed: @@ -86,12 +86,12 @@ namespace Bit.Core.Models.Data case EventType.OrganizationUser_UpdatedGroups: PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__ActingUserId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, (int)Type); break; case EventType.Organization_Updated: PartitionKey = $"OrganizationId={OrganizationId}"; RowKey = string.Format("Date={0}__ActingUserId={1}__Type={2}", - CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, Type); + CoreHelpers.DateTimeToTableStorageKey(Date), ActingUserId, (int)Type); break; default: break;