Sindbad~EG File Manager

Current Path : /proc/thread-self/root/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/
Upload File :
Current File : //proc/thread-self/root/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/062_fix_null_expiration.py

"""
Fix IPs that were added with NULL expiration to the WB lists
"""


def migrate(migrator, database, fake=False, **kwargs):
    IPListModel = migrator.orm["iplist"]
    IPListModel.update(expiration=0).where(
        (IPListModel.listname.in_(["WHITE", "BLACK"]))
        & (IPListModel.expiration.is_null())
    ).execute()


def rollback(migrator, database, fake=False, **kwargs):
    pass

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists