Skip to content

Commit

Permalink
Merge branch 'prevent-collab-events-on-import' into 'main'
Browse files Browse the repository at this point in the history
Prevent collab events on import

See merge request reportcreator/reportcreator!630
  • Loading branch information
MWedl committed Jul 30, 2024
2 parents 0b021e5 + 5cf0cc8 commit fd5c619
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
ProjectType,
ReportSection,
UserNotebookPage,
collab_context,
)
from reportcreator_api.pentests.serializers.notes import (
ProjectNotebookPageSerializer,
Expand Down Expand Up @@ -147,6 +148,7 @@ def export_archive_iter(data, serializer_class: Type[serializers.Serializer], co

@transaction.atomic()
@history_context(history_change_reason='Imported')
@collab_context(prevent_events=True)
def import_archive(archive_file, serializer_classes: list[Type[serializers.Serializer]], context=None):
context = (context or {}) | {
'archive': None,
Expand Down

0 comments on commit fd5c619

Please sign in to comment.