Answer the question
In order to leave comments, you need to log in
Can you help me convert PostgreSQL query to DjangoORM syntax?
Dear experts, do not tell me how to rewrite this query in the Django ORM style:
SELECT *
FROM records_status rs
WHERE company_id = (
SELECT company_id
FROM customauth_user
WHERE
id = 4 AND
(
is_superuser = true OR
NOT (permissions ? CONCAT('records.', rs.key, '.denied'))
)
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question