Created
April 29, 2016 10:02
-
-
Save nop33/a1db11d0a553ca52adb56e97b00b123f to your computer and use it in GitHub Desktop.
Slays zombi events in a category
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BTrees.OOBTree import OOTreeSet | |
cat = CategoryManager().getById(5052) | |
new_conferences = OOTreeSet() | |
for conf in cat.conferences: | |
if not EE(conf.getId()).is_deleted: | |
new_conferences.insert(conf) | |
else: | |
cat.unindexConf(conf) | |
cat.conferences = new_conferences | |
cat._numConferences = len(new_conferences) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment