Skip to content

♻️ Changing == by is_ in sqlalchemy queries #6654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
4 changes: 2 additions & 2 deletions scripts/maintenance/migrate_project/src/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_project(connection: Connection, project_uuid: UUID) -> ResultProxy:
def _get_hidden_project(connection: Connection, prj_owner: int) -> ResultProxy:
return connection.execute(
select(projects).where(
and_(projects.c.prj_owner == prj_owner, projects.c.hidden == True)
and_(projects.c.prj_owner == prj_owner, projects.c.hidden.is_(True))
)
)

Expand All @@ -61,7 +61,7 @@ def _get_file_meta_data_without_soft_links(
and_(
file_meta_data.c.node_id == f"{node_uuid}",
file_meta_data.c.project_id == f"{project_id}",
file_meta_data.c.is_soft_link != True,
file_meta_data.c.is_soft_link.is_not(True),
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def iter_latest_product_services(
)
& (services_meta_data.c.deprecated.is_(None))
& (services_access_rights.c.gid == EVERYONE_GROUP_ID)
& (services_access_rights.c.execute_access == True)
& (services_access_rights.c.execute_access.is_(True))
& (services_access_rights.c.product_name == product_name)
)
)
Expand Down Expand Up @@ -161,7 +161,7 @@ async def validate_requested_service(
sa.select(services_consume_filetypes.c.is_guest_allowed)
.where(
(services_consume_filetypes.c.service_key == service_key)
& (services_consume_filetypes.c.is_guest_allowed == True)
& (services_consume_filetypes.c.is_guest_allowed.is_(True))
)
.limit(1)
)
Expand Down
Loading