[Fixed] Minor bug encountered during editing an event.

Steps to reproduce the bug:

1. Try to edit any space event.

**Outcome** : global name 'space' is not defined

**Expected Outcome** : The event gets edited.