File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 49
49
)
50
50
51
51
52
+ @transaction .atomic
52
53
def home (request ):
54
+ curs = connection .cursor ()
55
+ # Make sure the that all the queries work on the same snapshot. Needs to be
56
+ # first in the transaction.atomic decorator.
57
+ curs .execute ("SET TRANSACTION ISOLATION LEVEL REPEATABLE READ" )
58
+
53
59
cfs = CommitFest .relevant_commitfests ()
54
60
55
61
context = {
@@ -58,7 +64,7 @@ def home(request):
58
64
"header_activity_link" : "/activity/" ,
59
65
}
60
66
61
- # Add dashboard content for logged-in users (same as me() view)
67
+ # Add dashboard content for logged-in users
62
68
if request .user .is_authenticated :
63
69
# Check if user is experienced (has been active for a while)
64
70
@@ -67,8 +73,6 @@ def home(request):
67
73
days = 30
68
74
)
69
75
70
- # Exact same logic as me() view
71
-
72
76
curs = connection .cursor ()
73
77
curs .execute ("SET TRANSACTION ISOLATION LEVEL REPEATABLE READ" )
74
78
You can’t perform that action at this time.
0 commit comments