Error when editing a calendar appointment returns stacktrace and query