diff options
Diffstat (limited to 'apscheduler/job.py')
-rw-r--r-- | apscheduler/job.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apscheduler/job.py b/apscheduler/job.py index d676ca8..5c1b75d 100644 --- a/apscheduler/job.py +++ b/apscheduler/job.py @@ -242,8 +242,9 @@ class Job(object): # Instance methods cannot survive serialization as-is, so store the "self" argument # explicitly - if ismethod(self.func) and not isclass(self.func.__self__): - args = (self.func.__self__,) + tuple(self.args) + func = self.func + if ismethod(func) and not isclass(func.__self__) and obj_to_ref(func) == self.func_ref: + args = (func.__self__,) + tuple(self.args) else: args = self.args |