Skip to content

Conversation

@Temmmmmo
Copy link
Member

@Temmmmmo Temmmmmo commented Aug 4, 2023

Изменения

Теперь при обновлении пользователей, если последний не был указан в запросе, то он удаляется из базы.

Реализации

Реализована проверка на то, надо ли удалять пользователя или оставлять его.

Детали

Происходит удаление пользователей с теми id, которые не были указаны в начальном запросе.

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить black и isort?

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

💩 Code linting failed, use black and isort to fix it.

@Temmmmmo Temmmmmo self-assigned this Aug 4, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
print_service
   __main__.py440%1–7
   base.py12467%6–9
   exceptions.py52787%21, 40, 45, 60, 65, 70, 77
print_service/routes
   admin.py492647%28–29, 32–36, 39–43, 50–56, 63–69
   auth.py440%1–8
   exc_handlers.py59985%34, 58, 70, 80, 124, 136, 144, 154, 166
   file.py1301985%49, 55, 57, 129–130, 171, 179–180, 182, 185–186, 191–192, 202–205, 247, 256
   qrprint.py844744%36–45, 50–56, 59–66, 69–78, 81, 84–87, 95–98, 106–111
   user.py60395%66, 130, 132
print_service/utils
   __init__.py58395%44, 86–87
TOTAL63512680% 

Summary

Tests Skipped Failures Errors Time
24 1 💤 0 ❌ 0 🔥 1.592s ⏱️

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

💩 Code linting failed, use black and isort to fix it.

Copy link
Member

@grigoriev-semyon grigoriev-semyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тесты норм
добавь lazy и норм

@grigoriev-semyon
Copy link
Member

grigoriev-semyon commented Aug 4, 2023

@dyakovri посмотри тоже пж

Comment on lines +128 to +133
for _user in db_delete_users:
for print_fact in _user.print_facts:
db.session.delete(print_fact)
for files in _user.files:
db.session.delete(files)
db.session.delete(_user)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мы так просрем всю статистику. Так делать нельзя

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Софт делит на юзера надо сделать

@grigoriev-semyon grigoriev-semyon dismissed their stale review August 6, 2023 18:22

soft deletes

Copy link
Member

@grigoriev-semyon grigoriev-semyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soft deletes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Полное обновление пользователей, а не добавление их в список

4 participants