MyActionManager.testbar()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
1
from datetime import datetime
2
3
from actstream.managers import ActionManager, stream
4
5
6
class MyActionManager(ActionManager):
7
8
    @stream
9
    def testfoo(self, obj, time=None):
10
        if time is None:
11
            time = datetime.now()
12
        return obj.actor_actions.filter(timestamp__lte=time)
13
14
    @stream
15
    def testbar(self, verb):
16
        return {'verb': verb}
17