diff --git a/app/blueprints/api/collections/routes.py b/app/blueprints/api/collections/routes.py index d9fabe0..4c50530 100644 --- a/app/blueprints/api/collections/routes.py +++ b/app/blueprints/api/collections/routes.py @@ -62,6 +62,6 @@ def export_users_to_csv(id: int): writer = csv.DictWriter(si, fieldnames) writer.writeheader() - writer.writerows(map(lambda user: user.to_dict(), collection.users)) + writer.writerows(map(lambda user: user.to_dict(), filter(lambda user: not user.delete, collection.users))) return si.getvalue(), 200, {'Content-Disposition': f'attachment; filename={filename}', 'Content-type': 'text/csv; charset=utf-8'} \ No newline at end of file