diff --git a/chcemvediet/apps/anonymization/management/commands/attachment_anonymization.py b/chcemvediet/apps/anonymization/management/commands/attachment_anonymization.py index 1e28ba3dd..158f5ce77 100644 --- a/chcemvediet/apps/anonymization/management/commands/attachment_anonymization.py +++ b/chcemvediet/apps/anonymization/management/commands/attachment_anonymization.py @@ -71,12 +71,11 @@ def handle(self, *args, **options): if not content: raise CommandError(u'No content given.') - with transaction.atomic(): - attachments_finalization.delete() - AttachmentFinalization.objects.create( - attachment=attachment, - successful=True, - file=ContentFile(content), - content_type=options[u'content_type'] or magic.from_buffer(content, mime=True), - debug=options[u'debug'], - ) + attachments_finalization.delete() + AttachmentFinalization.objects.create( + attachment=attachment, + successful=True, + file=ContentFile(content), + content_type=options[u'content_type'] or magic.from_buffer(content, mime=True), + debug=options[u'debug'], + )