diff --git a/amivapi/events/queue.py b/amivapi/events/queue.py index e2f8a2f0..7f099dbf 100644 --- a/amivapi/events/queue.py +++ b/amivapi/events/queue.py @@ -101,11 +101,11 @@ def update_waiting_list_after_insert(signups): event = current_app.data.find_one('events', None, **lookup) lookup = {'event': event_id, 'accepted': True} signup_count = ( - current_app.data.driver.db['eventsignups']\ - .count_documents(lookup)) + current_app.data.driver.db['eventsignups'] + .count_documents(lookup)) if event is not None: if event['selection_strategy'] == "manual" \ - and signup_count < event['spots']: + and signup_count < event['spots']: notify_signup_accepted(event, signup, True, True) else: notify_signup_accepted(event, signup, True, False) diff --git a/amivapi/tests/events/test_emails.py b/amivapi/tests/events/test_emails.py index 5802fb87..c1f07e23 100644 --- a/amivapi/tests/events/test_emails.py +++ b/amivapi/tests/events/test_emails.py @@ -441,7 +441,8 @@ def test_notify_waitlist_on_signup_update(self): }, status_code=201).json # this results in a different email - self.assertTrue('are manually reviewed' in self.app.test_mails[0]['text']) + self.assertTrue('are manually reviewed' + in self.app.test_mails[0]['text']) # User manually accepted from waiting list self.api.patch('/eventsignups/%s' % manual_signup['_id'],