fix: select_for_update cannot be used outside of a transaction.

FFIB лет %!s(int64=4): %!d(string=назад)
Родитель
Сommit
c04720954b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      api/member_views.py

+ 1 - 1
api/member_views.py

@@ -460,7 +460,7 @@ def activity_group_share(request):
460 460
         return response()
461 461
 
462 462
     try:
463
-        act = MemberActivityInfo.objects.select_for_update().get(activity_id=activity_id, status=True)
463
+        act = MemberActivityInfo.objects.get(activity_id=activity_id, status=True)
464 464
     except MemberActivityInfo.DoesNotExist:
465 465
         return response(MemberActivityStatusCode.ACTIVITY_NOT_FOUND)
466 466