File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ class AuditlogtHTTPSession(models.Model):
13
13
_rec_name = 'display_name'
14
14
15
15
display_name = fields .Char (u"Name" , compute = "_display_name" )
16
- name = fields .Char (u"Session ID" )
16
+ name = fields .Char (u"Session ID" , index = True )
17
17
user_id = fields .Many2one (
18
- 'res.users' , string = u"User" )
18
+ 'res.users' , string = u"User" , index = True )
19
19
http_request_ids = fields .One2many (
20
20
'auditlog.http.request' , 'http_session_id' , string = u"HTTP Requests" )
21
21
@@ -43,7 +43,8 @@ def current_http_session(self):
43
43
if httpsession :
44
44
existing_session = self .search (
45
45
[('name' , '=' , httpsession .sid ),
46
- ('user_id' , '=' , request .uid )])
46
+ ('user_id' , '=' , request .uid )],
47
+ limit = 1 )
47
48
if existing_session :
48
49
return existing_session .id
49
50
vals = {
You can’t perform that action at this time.
0 commit comments