Merge pull request #3199 from FinnStutzenstein/Issue3192

Fix clearing empty chat messages (fixes #3192)
This commit is contained in:
Emanuel Schütze 2017-04-19 08:52:26 +02:00 committed by GitHub
commit 146b49c4aa
2 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,8 @@ Motions:
Core:
- No reload on logoff. OpenSlides is now a full single page
application [#3172].
- Adding support for choosing image files as logos.
- Adding support for choosing image files as logos [#3184].
- Fixing error when clearing empty chat [#3199].
Users:
- User without permission to see users can now see agenda item speakers,

View File

@ -737,7 +737,8 @@ class ChatMessageViewSet(ModelViewSet):
args.append(chatmessage.pk)
chatmessages.delete()
# Trigger autoupdate and setup response.
inform_deleted_data(*args)
if len(args) > 0:
inform_deleted_data(*args)
return Response({'detail': _('All chat messages deleted successfully.')})