Current Path : /proc/thread-self/root/opt/imunify360/venv/lib64/python3.11/site-packages/defence360agent/migrations/ |
Current File : //proc/thread-self/root/opt/imunify360/venv/lib64/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