Conditions | 4 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import random |
||
16 | def filter(self, record): |
||
17 | if not hasattr(record, 'user_id'): |
||
18 | record.user_id = getattr(local, 'user_id', None) |
||
19 | if not hasattr(record, 'id'): |
||
20 | record.id = getattr(local, 'random', None) |
||
21 | if not hasattr(record, 'ip'): |
||
22 | record.ip = getattr(local, 'client_ip', None) |
||
23 | return True |