fix(next): properly sets doc id types when using postgres (#9381)
Fixes #9351. When using Postgres, doc ids were being treated as a string as opposed to a number within the admin panel. This led to issues for anything relying on the `docID` from context, such as the join field not properly populating initial data when creating new documents, etc.
This commit is contained in:
@@ -51,9 +51,9 @@ export function getRouteInfo({
|
||||
globalConfig = config.globals.find((global) => global.slug === globalSlug)
|
||||
}
|
||||
|
||||
// If the collection has an ID field, we need to determine the type of the ID field
|
||||
// If the collection is using a custom ID, we need to determine it's type
|
||||
if (collectionConfig && payload) {
|
||||
if (payload.collections?.[collectionSlug]) {
|
||||
if (payload.collections?.[collectionSlug]?.customIDType) {
|
||||
idType = payload.collections?.[collectionSlug].customIDType
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ export interface Config {
|
||||
user: User & {
|
||||
collection: 'users';
|
||||
};
|
||||
jobs?: {
|
||||
jobs: {
|
||||
tasks: unknown;
|
||||
workflows?: unknown;
|
||||
workflows: unknown;
|
||||
};
|
||||
}
|
||||
export interface UserAuthOperations {
|
||||
|
||||
Reference in New Issue
Block a user