Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bi-queries/controller/pipeline-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function createPipeline(queryData: IQuery, params: IParams[]) {
if (v) {
if (arg.tipo === 'date') {
v.valor = moment(v.valor).toDate();
} else if (Types.ObjectId.isValid(v.valor) && new Types.ObjectId(v.valor).toString() === v.valor) {
} else if (Types.ObjectId.isValid(v.valor) && new Types.ObjectId(v.valor).toString() === v.valor && (arg.formato !== 'string')) {
v.valor = new Types.ObjectId(v.valor);
}
}
Expand Down
2 changes: 1 addition & 1 deletion bi-queries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tsc:w": "../node_modules/typescript/bin/tsc -w",
"node": "nodemon -q ./index.js"
},
"author": "Celeste Ramos y Luis Parada",
"author": "ANDES",
"license": "ISC",
"dependencies": {
"@andes/bootstrap": "file:../bootstrap",
Expand Down
2 changes: 2 additions & 0 deletions bi-queries/schemas/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type IQuery = {
key: string;
label: string;
tipo: string;
formato?: string,
required: boolean;
subquery: any;
}[];
Expand Down Expand Up @@ -43,6 +44,7 @@ export const QuerySchema = new mongoose.Schema({
key: String,
label: String,
tipo: String,
formato: String,
required: Boolean,
subquery: mongoose.SchemaTypes.Mixed,

Expand Down