Compare commits

..

2 Commits

2 changed files with 2 additions and 2 deletions

View File

@ -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'}

View File

@ -2,7 +2,7 @@
<div class="card">
<div class="card-header"><h5>{{ collection.name }}</h5></div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Кол-во пользрвателей: {{ collection.users|length }}</li>
<li class="list-group-item">Кол-во пользрвателей: {{ collection.users|selectattr("delete", "false")|list|length }}</li>
</ul>
<div class="card-footer px-2 pt-2">
<div class="d-flex gap-2" role="group">