Browse Source
Module 'auditlog' - A log can be created with no current HTTP request (unit tests, ir.cron...)
pull/1040/head
sebalix
9 years ago
committed by
Enric Tobella
No known key found for this signature in database
GPG Key ID: 1A2546A1B7BA2451
2 changed files with
4 additions and
0 deletions
-
auditlog/models/http_request.py
-
auditlog/models/http_session.py
|
|
@ -46,6 +46,8 @@ class AuditlogHTTPRequest(models.Model): |
|
|
|
first call. |
|
|
|
If no HTTP request is available, returns `False`. |
|
|
|
""" |
|
|
|
if not request: |
|
|
|
return False |
|
|
|
http_session_model = self.env['auditlog.http.session'] |
|
|
|
httprequest = request.httprequest |
|
|
|
if httprequest: |
|
|
|
|
|
@ -42,6 +42,8 @@ class AuditlogtHTTPSession(models.Model): |
|
|
|
first call. |
|
|
|
If no HTTP user session is available, returns `False`. |
|
|
|
""" |
|
|
|
if not request: |
|
|
|
return False |
|
|
|
httpsession = request.httpsession |
|
|
|
if httpsession: |
|
|
|
existing_session = self.search( |
|
|
|