mirror of
https://github.com/bitwarden/server.git
synced 2025-02-16 01:51:21 +01:00
cast Min function values to int (#2459)
This commit is contained in:
parent
a0ab60f984
commit
41db511872
@ -141,8 +141,8 @@ public class CollectionRepository : Repository<Core.Entities.Collection, Collect
|
|||||||
CreationDate = collectionGroup.Key.CreationDate,
|
CreationDate = collectionGroup.Key.CreationDate,
|
||||||
RevisionDate = collectionGroup.Key.RevisionDate,
|
RevisionDate = collectionGroup.Key.RevisionDate,
|
||||||
ExternalId = collectionGroup.Key.ExternalId,
|
ExternalId = collectionGroup.Key.ExternalId,
|
||||||
ReadOnly = collectionGroup.Min(c => c.ReadOnly),
|
ReadOnly = Convert.ToBoolean(collectionGroup.Min(c => Convert.ToInt32(c.ReadOnly))),
|
||||||
HidePasswords = collectionGroup.Min(c => c.HidePasswords),
|
HidePasswords = Convert.ToBoolean(collectionGroup.Min(c => Convert.ToInt32(c.HidePasswords))),
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ INSERT INTO "OrganizationApiKey"(
|
|||||||
"ApiKey",
|
"ApiKey",
|
||||||
"Type",
|
"Type",
|
||||||
"RevisionDate")
|
"RevisionDate")
|
||||||
SELECT gen_random_uuid(),
|
SELECT uuid_in(overlay(overlay(md5(random()::text || ':' || random()::text) placing '4' from 13) placing to_hex(floor(random()*(11-8+1) + 8)::int)::text from 17)::cstring),
|
||||||
"Id" AS "OrganizationId",
|
"Id" AS "OrganizationId",
|
||||||
"ApiKey",
|
"ApiKey",
|
||||||
0 AS "Type",
|
0 AS "Type",
|
||||||
|
@ -24,7 +24,7 @@ INSERT INTO "OrganizationApiKey"(
|
|||||||
"ApiKey",
|
"ApiKey",
|
||||||
"Type",
|
"Type",
|
||||||
"RevisionDate")
|
"RevisionDate")
|
||||||
SELECT gen_random_uuid(),
|
SELECT uuid_in(overlay(overlay(md5(random()::text || ':' || random()::text) placing '4' from 13) placing to_hex(floor(random()*(11-8+1) + 8)::int)::text from 17)::cstring),
|
||||||
"Id" AS "OrganizationId",
|
"Id" AS "OrganizationId",
|
||||||
"ApiKey",
|
"ApiKey",
|
||||||
0 AS "Type",
|
0 AS "Type",
|
||||||
|
Loading…
Reference in New Issue
Block a user