##// END OF EJS Templates
audit-logger: use raw JSON with empty data to control unicode decode warnings....
marcink -
r2184:c4cc6e2a default
parent child Browse files
Show More
@@ -21,6 +21,7 b''
21 import logging
21 import logging
22 import datetime
22 import datetime
23
23
24 from rhodecode.lib.jsonalchemy import JsonRaw
24 from rhodecode.model import meta
25 from rhodecode.model import meta
25 from rhodecode.model.db import User, UserLog, Repository
26 from rhodecode.model.db import User, UserLog, Repository
26
27
@@ -120,13 +121,13 b' def _store_log(action_name, action_data,'
120 user_log.version = UserLog.VERSION_2
121 user_log.version = UserLog.VERSION_2
121
122
122 user_log.action = action_name
123 user_log.action = action_name
123 user_log.action_data = action_data
124 user_log.action_data = action_data or JsonRaw(u'{}')
124
125
125 user_log.user_ip = ip_address
126 user_log.user_ip = ip_address
126
127
127 user_log.user_id = user_id
128 user_log.user_id = user_id
128 user_log.username = username
129 user_log.username = username
129 user_log.user_data = user_data
130 user_log.user_data = user_data or JsonRaw(u'{}')
130
131
131 user_log.repository_id = repository_id
132 user_log.repository_id = repository_id
132 user_log.repository_name = repository_name
133 user_log.repository_name = repository_name
General Comments 0
You need to be logged in to leave comments. Login now