You don't need this line at all, just `if not event:` (after renaming the `basequery` parameter to `event`).