fix: is null sql statement (#4690)

* fix is null sql statement

* use == since linter complains about is_

* [autofix.ci] apply automated fixes

* ignore error

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Frazier 2024-11-19 05:27:17 -08:00 committed by GitHub
commit 50aa61826c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -152,7 +152,8 @@ class DatabaseService(Service):
settings_service = get_settings_service()
if settings_service.auth_settings.AUTO_LOGIN:
async with self.with_async_session() as session:
stmt = select(models.Flow).where(models.Flow.user_id is None)
# `== None` translates to SQL `is NULL`
stmt = select(models.Flow).where(models.Flow.user_id == None) # noqa: E711
flows = (await session.exec(stmt)).all()
if flows:
logger.debug("Migrating flows to default superuser")