Show More
@@ -1292,10 +1292,15 b' class AuthUser(object):' | |||||
1292 | # we get deleted objects here, we just skip them |
|
1292 | # we get deleted objects here, we just skip them | |
1293 | pass |
|
1293 | pass | |
1294 |
|
1294 | |||
1295 | user_ips = UserIpMap.query().filter(UserIpMap.user_id == user_id) |
|
1295 | # NOTE:(marcink) we don't want to load any rules for empty | |
1296 | if cache: |
|
1296 | # user_id which is the case of access of non logged users when anonymous | |
1297 | user_ips = user_ips.options( |
|
1297 | # access is disabled | |
1298 | FromCache("sql_cache_short", "get_user_ips_%s" % user_id)) |
|
1298 | user_ips = [] | |
|
1299 | if user_id: | |||
|
1300 | user_ips = UserIpMap.query().filter(UserIpMap.user_id == user_id) | |||
|
1301 | if cache: | |||
|
1302 | user_ips = user_ips.options( | |||
|
1303 | FromCache("sql_cache_short", "get_user_ips_%s" % user_id)) | |||
1299 |
|
1304 | |||
1300 | for ip in user_ips: |
|
1305 | for ip in user_ips: | |
1301 | try: |
|
1306 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now