Skip to content

Commit

Permalink
Disable admin check when content deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lev committed Apr 21, 2024
1 parent 553de23 commit bb41cc5
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ async def delete(self):
self._check_reply_existed()
reply = self.message_service.message.reply
content = self.message_service.select_content_from_message(reply)
try:
is_admin = await ExternalMemberService(
self.db, self.member_service, self.message_service
).check_admin_permission()
except ValueError:
is_admin = True
if not is_admin:
raise RaiseUpException("Нет прав для удаления контента в данном чате")
# try:
# is_admin = await ExternalMemberService(
# self.db, self.member_service, self.message_service
# ).check_admin_permission()
# except ValueError:
# is_admin = True
# if not is_admin:
# raise RaiseUpException("Нет прав для удаления контента в данном чате")
if self.default_answer_pack is None:
raise RaiseUpException("У чата нет ни одного пакета под управлением")
answer_entities = await AnswerEntity.async_filter(
Expand Down
Loading

0 comments on commit bb41cc5

Please sign in to comment.