mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 04:07:50 +08:00
fix(data-vi): issue where getting timezone from context (#5743)
* fix(data-vi): issue where getting timezone from context * fix: test
This commit is contained in:
parent
6bd5b9b54c
commit
9f255eba89
@ -71,7 +71,6 @@ describe('formatter', () => {
|
||||
const ctx = {
|
||||
app,
|
||||
db,
|
||||
timezone: '+05:30',
|
||||
action: {
|
||||
params: {
|
||||
values: {
|
||||
@ -85,6 +84,7 @@ describe('formatter', () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
get: () => '+05:30',
|
||||
} as any;
|
||||
const queryParser = createQueryParser(db);
|
||||
await compose([parseFieldAndAssociations, queryParser.parse(), queryData])(ctx, async () => {});
|
||||
@ -112,7 +112,7 @@ describe('formatter', () => {
|
||||
const ctx = {
|
||||
app,
|
||||
db,
|
||||
timezone: '+05:30',
|
||||
get: () => '+05:30',
|
||||
action: {
|
||||
params: {
|
||||
values: {
|
||||
@ -153,7 +153,7 @@ describe('formatter', () => {
|
||||
const ctx = {
|
||||
app,
|
||||
db,
|
||||
timezone: '+05:30',
|
||||
get: () => '+05:30',
|
||||
action: {
|
||||
params: {
|
||||
values: {
|
||||
@ -202,7 +202,7 @@ describe('formatter', () => {
|
||||
const ctx = {
|
||||
app,
|
||||
db,
|
||||
timezone: '+05:30',
|
||||
get: () => '+05:30',
|
||||
action: {
|
||||
params: {
|
||||
values: {
|
||||
@ -250,7 +250,7 @@ describe('formatter', () => {
|
||||
const ctx = {
|
||||
app,
|
||||
db,
|
||||
timezone: '+05:30',
|
||||
get: () => '+05:30',
|
||||
action: {
|
||||
params: {
|
||||
values: {
|
||||
|
@ -97,7 +97,7 @@ export class QueryParser {
|
||||
attributes: dimensionAttributes,
|
||||
group,
|
||||
fieldMap: dimensionFieldMap,
|
||||
} = this.parseDimensions(ctx, dimensions, hasAgg, ctx.timezone);
|
||||
} = this.parseDimensions(ctx, dimensions, hasAgg, ctx.get?.('x-timezone'));
|
||||
const order = this.parseOrders(ctx, orders, hasAgg);
|
||||
|
||||
ctx.action.params.values = {
|
||||
|
Loading…
Reference in New Issue
Block a user