Fixed string formatting in exception raising

This commit is contained in:
Sybren A. Stüvel 2017-06-06 17:35:30 +02:00
parent c3ea8228a1
commit c2bc52718a

View File

@ -50,8 +50,8 @@ def user_group_action(user_id: bson.ObjectId, group_id: bson.ObjectId, action: s
) )
if result.matched_count == 0: if result.matched_count == 0:
raise ValueError('Unable to %s user %s membership of group %s; user not found.', raise ValueError(f'Unable to {action} user {user_id} membership of group {group_id}; '
action, user_id, group_id) f'user not found.')
def setup_app(app, api_prefix): def setup_app(app, api_prefix):