From 18baff356fcec6fa4a7a7ff9802a2c6f729721ea Mon Sep 17 00:00:00 2001 From: Dmitriy Ovcharenko Date: Thu, 5 Dec 2024 16:19:00 +1000 Subject: [PATCH] Fix(frontend): ``FKField`` queryset resolving. --- frontend_src/vstutils/fields/fk/fk/FKField.ts | 3 ++- frontend_src/vstutils/signals.ts | 2 +- vstutils/__init__.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend_src/vstutils/fields/fk/fk/FKField.ts b/frontend_src/vstutils/fields/fk/fk/FKField.ts index bdc17054..cbe12444 100644 --- a/frontend_src/vstutils/fields/fk/fk/FKField.ts +++ b/frontend_src/vstutils/fields/fk/fk/FKField.ts @@ -304,7 +304,8 @@ export class FKField extends BaseField impl getAllQuerysets(path: string) { return this._formatQuerysets( - this.querysets.get(path) || this.querysets.get(undefined) || [this.getFallbackQs()], + this.querysets.get(path) || + this.querysets.get(undefined) || [this.getValueFetchQs(path) || this.getFallbackQs()], ); } } diff --git a/frontend_src/vstutils/signals.ts b/frontend_src/vstutils/signals.ts index fe9ddc07..63ad37ca 100644 --- a/frontend_src/vstutils/signals.ts +++ b/frontend_src/vstutils/signals.ts @@ -85,7 +85,7 @@ const createHook = (() => { }; })(); -export const onAppCreated = createHook<[{ app: IAppInitialized }]>(APP_CREATED); +export const onAppCreated = createHook<[IAppInitialized]>(APP_CREATED); export const onAppAfterInit = createHook<[{ app: IAppInitialized }]>(APP_AFTER_INIT); export const onAppBeforeInit = createHook<[{ app: IAppInitialized }]>(APP_BEFORE_INIT); export const onSchemaViewsCreated = createHook<[{ views: IAppInitialized['views'] }]>(SCHEMA_VIEWS_CREATED); diff --git a/vstutils/__init__.py b/vstutils/__init__.py index 5338b3ec..7aaf5257 100644 --- a/vstutils/__init__.py +++ b/vstutils/__init__.py @@ -1,2 +1,2 @@ # pylint: disable=django-not-available -__version__: str = '5.11.16' +__version__: str = '5.11.17'