Skip to content
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

Avoid warnings when purging an empty database #12494

Merged
merged 1 commit into from
Feb 18, 2018

Conversation

amelchio
Copy link
Contributor

Description:

This hopefully addresses the SQLAlchemy warning mentioned by @balloob in #12448 (review) though I am unable to verify because I do not know how to get the warning.

Anyway, to avoid the warning about an empty IN clause, we now only add the filter for protected states when we actually have some states to protect.

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully.
  • Tests have been added to verify that the new code works.

@balloob
Copy link
Member

balloob commented Feb 18, 2018

py.test -W error testfile.py

@balloob balloob merged commit 0d0e0b8 into home-assistant:dev Feb 18, 2018
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants