Comments (5)
Sorry for bothering you.
It looks like this because I have attached the filter flow which returns a limited dataset. I have disabled flow execution and the error disappeared.
from directus.
Do you have any flows that hook into item updates?
from directus.
I have rechecked the issue and it looks like it is related to the Read Data
step.
I have created the flow on the screenshot.
.
On the "Run Script" configured
module.exports = async function (data) {
console.log(data);
return data.$trigger.payload;
};
If you execute this flow, then the error will be reproduced.
If you delete Read Data
step from the flow then JSON object will be printed into the log.
from directus.
That's probably because you have an invalid id variable string ({{ $trigger.keys[] }}
). You need to drop the []
.
Closing again, as this is a setup / flow problem and not a Directus Core problem. If you have any further questions to this don't hesitate to ask on our Community Discord Server.
from directus.
Thanks for the explanation.
I have tested {{ $trigger.keys }}
and this does work. I got error message in the console
[12:54:45.930] ERROR: select "tenant"."id", "tenant"."user_created", "tenant"."date_created", "tenant"."user_updated", "tenant"."date_updated", "tenant"."name", "tenant"."status", "tenant"."user_owner", "tenant"."company_owner" from "tenant" where "tenant"."id" = $1 order by "tenant"."id" asc limit $2 - invalid input syntax for type uuid: "{"b5cc5154-4411-4658-bb88-dbd399e4e731"}"
err: {
"type": "DatabaseError",
"message": "select "tenant"."id", "tenant"."user_created", "tenant"."date_created", "tenant"."user_updated", "tenant"."date_updated", "tenant"."name", "tenant"."status", "tenant"."user_owner", "tenant"."company_owner" from "tenant" where "tenant"."id" = $1 order by "tenant"."id" asc limit $2 - invalid input syntax for type uuid: "{"b5cc5154-4411-4658-bb88-dbd399e4e731"}"",
"stack":"length": 135, "name": "error", "severity": "ERROR", "code": "22P02", "file": "uuid.c", "line": "134", "routine": "string_to_uuid"
}
It looks like ID compared with json object
invalid input syntax for type uuid: "{"b5cc5154-4411-4658-bb88-dbd399e4e731"}"",
Then I tried to use {{ $trigger.keys[0] }}
and in this case, flow works as expected.
Question.
Should selectors {{ $trigger.keys[0] }}
and {{ $trigger.keys[] }}
works both?
from directus.
Related Issues (20)
- Throw errors when present from sdk
- How to create or delete user by only admin approval HOT 1
- why I am use .with(staticToken('staticToken')) tip Invalid user credentials HOT 3
- Manual sorting in M2M interface table layout is not obvious HOT 2
- Graphql errors getting swallowed by the SDK
- Applying a schema does not seem to invalidate the schema cache HOT 2
- Unable to Update Directus in Digital Ocean HOT 2
- Incomplete Display of Related Items in M2M Relationship
- DefineHooks Init Method Doesnt Work HOT 6
- "Cannot read properties of undefined (reading 'join')" when doing certain Custom Migrations
- Invalid filter key "version" on "directus_revisions" HOT 2
- "Inconsistent chunk size" when uploading to cloudinary via Directus
- Images get stored to cloudinary as "Raw" instead of "Image" when uploading via Directus HOT 2
- Error while creating map's Point field in Directus HOT 1
- Accessing item with share URL throws SQL error HOT 3
- FORBIDDEN modifying HOT 6
- `formatted-value` display should have an option to translate the field value
- Directus Admin-App is logging out, when doing a hard refresh HOT 1
- "Default value" is disabled on CSV fields HOT 1
- Checkboxes interface doesn't reflect default value on item creation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directus.