From feabab030d526fa5b9cf36d5a2afed8a6b644b50 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 10 Sep 2024 16:07:43 +0200 Subject: [PATCH] =?UTF-8?q?fixup!=20=E2=9C=A8(models/api)=20add=20link=20a?= =?UTF-8?q?ccess=20reach=20and=20role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/core/api/viewsets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index b110ce5ed..4c6fe8404 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -358,7 +358,7 @@ class DocumentViewSet( try: # Add a trace that the user visited the document (this is needed to include # the document in the user's list view) - models.LinkTrace.objects.create( + models.LinkTrace.objects.update_or_create( document=instance, user=self.request.user, )